Wednesday, October 17, 2018

Lesson 4: Git rebase

1 Git rebase:
        Now we are checked out on the master branch. Let's go ahead and rebase onto bugFix...
There! Since master was an ancestor of bugFix, git simply moved the master branch reference forward in history.
  • Checkout a new branch named bugFix
  • Commit once
  • Go back to master and commit again
  • Check out bugFix again and rebase onto master
 
Currently:
 
Goal:
 
Git command line:

$ git checkout -b bugFix
$ git checkout master
$ git commit
$ git checkout bugFix
$ git commit
$ git rebase master
$ reset
$ git checkout -b bugFix
$ git commit
$ git checkout master
$ git commit
$ git checkout bugFix
$ git rebase master









No comments:

Post a Comment