Figure 2-16 Changes to the Text File in the
newfeature Branch
On the newfeature branch, you can issue the following
commands to add the changes to the index and then
commit the change:
Click here to view code image
#git add.
#git commit -a -m "new feature"
Now the branch is synced with the new changes, and you
can switch back to the master branch with the following
command:
Click here to view code image
#git checkout master
Switched to branch 'master'
From the master branch, you can then issue the git
merge command and identify the branch to merge with
(in this case, the newfeature branch):
Click here to view code image