<$BlogRSDUrl$>

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. 

  1. Create new branch from master
    1. git checkout –b regression-tests
  2. Hack
  3. Commit changes
    1. git commit –am “Partial implementation of new regression test”
  4. Create a second branch for a different problem
    1. git checkout –b parser-bug
  5. Hack
  6. Commit changes
    1. git commit –am “Fix parser bug”
  7. Merge into master
    1. git checkout master
    2. git merge parser-bug
  8. Delete branch that is no longer needed
    1. git branch –d parser-bug
  9. Push to remote if desired
    1. git push origin master
  10. Make first branch current again
  11. Continue to hack

This page is powered by Blogger. Isn't yours?