Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [myself@somehost ~]$ mkdir bubu
- [myself@somehost ~]$ cd bubu
- [myself@somehost bubu]$ git init
- Initialized empty Git repository in /home/myself/bubu/.git/
- [myself@somehost bubu]$ cat > file
- [myself@somehost bubu]$ git add file
- [myself@somehost bubu]$ git commit
- [master (root-commit) 30b5b60] first
- 1 files changed, 2 insertions(+), 0 deletions(-)
- create mode 100644 file
- [myself@somehost bubu]$ git checkout -b branch1
- Switched to a new branch 'branch1'
- [myself@somehost bubu]$ emacs file
- [myself@somehost bubu]$ # added a in first line
- [myself@somehost bubu]$ git commit -a -m 'added a in first line'
- [branch1 4ac5e60] added a in first line
- 1 files changed, 1 insertions(+), 1 deletions(-)
- [myself@somehost bubu]$ git checkout 30b5b60
- Note: checking out '30b5b60'.
- You are in 'detached HEAD' state. You can look around, make experimental
- changes and commit them, and you can discard any commits you make in this
- state without impacting any branches by performing another checkout.
- If you want to create a new branch to retain commits you create, you may
- do so (now or later) by using -b with the checkout command again. Example:
- git checkout -b new_branch_name
- HEAD is now at 30b5b60... first
- [myself@somehost bubu]$ git checkout -b branch2
- Switched to a new branch 'branch2'
- [myself@somehost bubu]$ emacs file
- [myself@somehost bubu]$ git commit -a -m 'added b in second line'
- [branch2 d6817e7] added b in second line
- 1 files changed, 1 insertions(+), 1 deletions(-)
- [myself@somehost bubu]$ git merge branch1
- Auto-merging file
- CONFLICT (content): Merge conflict in file
- Automatic merge failed; fix conflicts and then commit the result.
- [myself@somehost bubu]$ emacs file
- [myself@somehost bubu]$ # I resolved the conflict wrong on purpose
- [myself@somehost bubu]$ git commit -a # On purpose I get rid of the message
- [branch2 7b57499] merge with hidden conflicts
- [myself@somehost bubu]$ gitk
- [myself@somehost bubu]$ #gitk did not show the manually resolved conflict
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement