Skip to content

Instantly share code, notes, and snippets.

@boopathi
Created June 20, 2015 20:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boopathi/e32b84be0add622ebf37 to your computer and use it in GitHub Desktop.
Save boopathi/e32b84be0add622ebf37 to your computer and use it in GitHub Desktop.
A simple git workflow that works
  • git pull --rebase always
  • git checkout -b feature/my-awesome-feature before committing anything
  • git commit --amend whenever possible
  • git commit --fixup and git commit --squash in case you pushed to origin and you don't want to force push now
  • Write long and meaningful commit messages
  • Create a Pull Request and continue pushing more commits till review is accepted
  • git rebase -i --autosquash master feature/my-awesome-feature and squash all unwanted commits
  • git push --force-with-lease origin my-awesome-feature when branches have diverged
  • Merge the Pull Request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment