Information Technology Reference
In-Depth Information
The conflicted file is denoted as DU . To keep i1.txt file in the master branch,
you need to stage a file:
$ git add i1.txt
and then create a new revision:
$ git commit -m "i1.txt file..."
Merging changes during checkout
To merge your modifications during checkout use the -m parameter:
$ git checkout -m master
The above command would produce exactly the same result as these three com-
mands:
$ git stash
$ git checkout master
$ git stash pop
However, by using the $ git stash command you postpone the moment you
wish to merge your stashed files.
How It Works
The $ git stash command used in the solution saves the current state of the sta-
ging area and the working directory and resets the working directory. The new un-
tracked files are not affected by this command. Therefore, if you want to save all of the
files (including untracked files) use the following two commands:
$ git add -A
$ git stash
The first command adds all modifications to the staging area. When run together,
the commands guarantee that all your modifications are stashed.
Search WWH ::




Custom Search