Git topic branch workflow
I find that the “topic branch workflow” is one of the cleanest ways to work with code using Git. Here’s my cheat sheet for how it’s done.
Pull in the repo
This is possibly a fork from Github.
git clone https://example.com/repository.gitcd repository/git checkout -b bugfixMake changes
git push --allPull in new updates
git checkout mastergit pull origin masterApply changes to master
git checkout bugfixgit rebase masterIf you don’t have commit access, here’s where you open a pull request and nicely explain it.
git checkout mastergit merge bugfixgit pushDelete local and remote branches
Wait for your commits to be merged, and then:
git branch -D bugfixgit push origin --delete bugfix