Skip to content

Latest commit

 

History

History
33 lines (26 loc) · 945 Bytes

README.md

File metadata and controls

33 lines (26 loc) · 945 Bytes

Branching tutorial

Get your own copy of the repository

  1. In GitHub, fork nrsiward/branching_tut to your account
  2. Clone branching_tut from your account to your local disk

Implementing a new feature

  1. Create branch feature1 (to implement a new feature)
  2. Change line 2 in file1.txt

Making an urgent bug fix at an inconvenient time

  1. Stash
  2. Change back to branch master (to make a bug fix before the feature is done)
  3. Edit line 3 and line 4 in file1.txt
  4. Stage and commit

Finishing the new feature

  1. Change to branch feature1
  2. Pop the stash
  3. Change line 4 in file1.txt (to finish implementing the feature)
  4. Stage & commit

Merge the new feature

  1. Change to branch master
  2. Merge branch feature1
  3. Resolve conflicts

Share with others

  1. Push

Clean up the uneeded branch

  1. Delete local branch feature1
  2. Push the branch deletion