Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ git init
- Initialized empty Git repository in /home/markf/so/.git/
- $ vi a.txt
- $ git add .
- $ git commit -m '1'
- [master (root-commit) d92b23b] 1
- 1 file changed, 1 insertion(+)
- create mode 100644 a.txt
- $ git hist
- * d92b23b 2015-08-29 | 1 (HEAD, master) [mark.fisher]
- $ git checkout -b f1 master
- Switched to a new branch 'f1'
- $ vi a.txt
- $ git add .
- $ git commit -m '2 on f1'
- [f1 1db4fed] 2 on f1
- 1 file changed, 1 insertion(+), 1 deletion(-)
- $ git checkout -b f2 master
- Switched to a new branch 'f2'
- $ git hist
- * d92b23b 2015-08-29 | 1 (HEAD, master, f2) [mark.fisher]
- $ vi a.txt
- $ git add .
- $ git commit -m '3 on f2'
- [f2 807e4a7] 3 on f2
- 1 file changed, 1 insertion(+), 1 deletion(-)
- $ git hist
- * 807e4a7 2015-08-29 | 3 on f2 (HEAD, f2) [mark.fisher]
- * d92b23b 2015-08-29 | 1 (master) [mark.fisher]
- $ git checkout master
- Switched to branch 'master'
- $ git merge --no-ff f2
- Merge made by the 'recursive' strategy.
- a.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- $ git hist
- * d193d0a 2015-08-29 | Merge branch 'f2' (HEAD, master) [mark.fisher]
- |
- | * 807e4a7 2015-08-29 | 3 on f2 (f2) [mark.fisher]
- |/
- * d92b23b 2015-08-29 | 1 [mark.fisher]
- $ git merge --no-ff f1
- Auto-merging a.txt
- CONFLICT (content): Merge conflict in a.txt
- Automatic merge failed; fix conflicts and then commit the result.
- $ git status
- On branch master
- You have unmerged paths.
- (fix conflicts and run "git commit")
- Unmerged paths:
- (use "git add <file>..." to mark resolution)
- both modified: a.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement