Git Gud

Useful Commands
...

  • Update Project:
git pull
# or alternatively
git fetch
  • Add files to commit:
git add <files>
  • Commit:
git commit -m "message"
  • Push:
git push

Branches
...

  • Get information / branch name:
git status
  • Switch to branch:
git checkout 'branch-name'
  • Make a new branch:
git checkout -b feature_x
  • Delete a branch:
git branch -d 'branch-name'
  • Push to a branch:
git push origin 'branch-name'
  • Preview changes:
git diff 'source_branch' 'target_branch'