Assignment-merge
Assignment-merge
$ git branch
* master
new-feature
M sample.txt
$ git status
On branch master
modified: sample.txt
no changes added to commit (use "git add" and/or "git commit -a")
M sample.txt
On branch branch1
modified: sample.txt
no changes added to commit (use "git add" and/or "git commit -a")
warning: in the working copy of 'sample.txt', LF will be replaced by CRLF the next time Git touches it
Already up to date.
$ cat sample.txt
Updating c0db83c..bf2a230
Fast-forward
sample.txt | 2 ++
$ git status
On branch branch2
$ cat sample.txt
$ git status
On branch branch2
modified: sample.txt
no changes added to commit (use "git add" and/or "git commit -a")
$ git add .
warning: in the working copy of 'sample.txt', LF will be replaced by CRLF the next time Git touches it
Auto-merging sample.txt
Automatic merge failed; fix conflicts and then commit the result.
Merging:
sample.txt
4 files to edit
$ git status
On branch master
Changes to be committed:
modified: sample.txt
Untracked files:
sample.txt.orig
Already up to date.
$ cat sample.txt