Skip to content

Cheatsheet

Quick reference for daily workflow.

Clone (SSH)

git clone git@github.com:org/repo.git
cd repo

Start Working on a Sub-Issue

git checkout main
git pull --rebase
git checkout -b feature/nameOfFeature/nameOfIssue

Check Status

git status

Stage Changes

git add <file>
git add .

Commit (Signed Automatically)

git commit -m "Add CAN timeout validation"

Update Branch Before Push

git pull --rebase origin main

Push Branch

git push -u origin feature/nameOfFeature/nameOfIssue

Fix Last Commit (Before Push)

git commit --amend

Interactive Rebase (Local Cleanup)

git rebase -i HEAD~n

After rebase:

git push --force-with-lease

(Only allowed on own branch and after approval if required.)

Revert a Commit (Safe on Shared Branches)

git revert <commit-hash>

Resolve Conflict

# edit file
git add <file>
git rebase --continue

Abort:

git rebase --abort

Delete Branch After Merge

Local:

git branch -d feature/nameOfFeature/nameOfIssue

Remote:

git push origin --delete feature/nameOfFeature/nameOfIssue

View History

git log --oneline --graph --decorate

Check Remotes

git remote -v

Coverage Reminder

Before opening PR:

  • ≥ 90% unit test coverage
  • CI green
  • All sub-issues resolved
  • Feature complete