Skip to content

Professional Git for Since AI Hackathon teams: flows, commit style, PR reviews and release hygiene.

Notifications You must be signed in to change notification settings

Since-AI/git-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Since AI — Git Guide

Professional Git for 72‑hour teams.
Updated: 9 Oct 2025 · sinceai.fi


The Rules

  1. Small PRs (≤300 lines), single purpose
  2. Conventional Commits: type(scope): summary
  3. No direct commits to main
  4. Rebase before merge
  5. Tag releases: vX.Y.Z

Start Here

# 1) clone and create a feature branch
git clone <your-repo-url>
cd <repo>
git checkout -b feat/your-change

# 2) code → commit small
git add -p
git commit -m "feat(ui): add signup form"

# 3) sync before PR
git fetch origin && git rebase origin/dev

# 4) push and open PR to 'dev'
git push -u origin feat/your-change

PRs are merged with Rebase or Squash (no merge commits).


Branches

  • main — stable, protected, releases only
  • dev — integration branch
  • Work in: feat/*, fix/*, docs/*, chore/*

Commit Messages (Conventional)

Types: feat fix docs chore refactor test build ci

Good:

feat(auth): add refresh tokens
fix(api): validate empty payloads

Pull Request Checklist

  • Single purpose and small
  • Conventional commit messages
  • CI green; tests/manual steps noted
  • No secrets or large binaries

Everyday Commands

git status
git lg                      # add alias below
git diff / git diff --staged
git add -p                  # stage hunks
git restore <file>          # discard changes
git revert <sha>            # safe undo
git stash push -m "wip" && git stash pop

Minimal Setup

git config --global pull.rebase true
git config --global fetch.prune true
git config --global init.defaultBranch main
git config --global alias.lg "log --oneline --decorate --graph --all"

If Push Is Rejected

git fetch origin
git rebase origin/dev
# resolve → git add <files> → git rebase --continue

Release (when ready)

git checkout main && git pull --ff-only
git tag -a v1.0.0 -m "v1.0.0"
git push origin v1.0.0

Glossary

  • Rebase: replay your commits on top of another branch for a linear history.
  • Squash: combine multiple commits into one.
  • Fast-forward: advancing a branch pointer without creating a merge commit.
  • Protected branch: branch with enforced rules (no direct pushes, PR checks).

Resources (modern, concise)


License

MIT (docs and code samples). Brand assets follow organizer guidelines.

Questions? Open an issue or ask your track mentor.
Event: https://sinceai.fi

About

Professional Git for Since AI Hackathon teams: flows, commit style, PR reviews and release hygiene.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published