Advertisement

Responsive Advertisement

Git Merge and Rebase

 Git Merge and Git Rebase:




Click Here For Detail Explanation of same:

Git Merge:
If you want to merge your master changes to feature branch, then replace step 7 as below:
7.checkout to feature and make a merge
 $git checkout feature
 $git merge master
It will create an extra commit for merge similarly.

Git Rebase:
In above example, one step is missing i.e adding fil e6 in master branch , after step 5 consider step 5.1 as adding file 6 to master by switching to master as below:
$git checkout master
$touch 6
$git add .
$git commit -m "added file 6 in master"
$git checkout feature

Post a Comment

0 Comments