Professional Documents
Culture Documents
Commands
Commands
touch index.html
git add -A
git commit -m "Initial commit"
git branch -v
create FINAL.txt
git pull
$ touch conflict.txt
$ git co -b conflictingBranch
Switched to a new branch 'conflictingBranch'
$ git co master
$ git add -A
$ git commit -m "Add conflict.txt file"
$ git co conflictingBranch
$ touch conflict.txt
$ git add -A
$ git ci -am"created different conflict.txt file to make conflict"
$ git co master
$ git merge conflictingBranch
CONFLICT (add/add): Merge conflict in conflict.txt
Auto-merging conflict.txt
Automatic merge failed; fix conflicts and then commit the result.
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
Unmerged paths:
(use "git add <file>..." to mark resolution)
both added: conflict.txt
$ cat conflict.txt
<<<<<<< HEAD
Aceast poem e important
si nimeni nu-l poate schimba
Mi-am pus inima in el
si n-am pierdut nici rima
=======
I only have trash to say
>>>>>>> conflictingBranch
$ git add -A