Friday, June 26, 2015
Basic git cheat sheet
Tony was nice enough to explain a basic idea how to do git branching for me today.
- Create new branch from master
- git checkout –b regression-tests
- Hack
- Commit changes
- git commit –am “Partial implementation of new regression test”
- Create a second branch for a different problem
- git checkout –b parser-bug
- Hack
- Commit changes
- git commit –am “Fix parser bug”
- Merge into master
- git checkout master
- git merge parser-bug
- Delete branch that is no longer needed
- git branch –d parser-bug
- Push to remote if desired
- git push origin master
- Make first branch current again
- Continue to hack