SHARE
TWEET

Untitled

a guest Aug 21st, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ cd /tmp
  2. $ mkdir test
  3. $ cd test
  4. $ git init
  5. Initialized empty Git repository in /private/tmp/test/.git/
  6. $ git commit --allow-empty -m root
  7. [master (root-commit) 6814cc9] root
  8. $ mkdir foo
  9. $ echo a > foo/a
  10. $ git add foo
  11. $ git commit -m a
  12. [master f72297b] a
  13.  1 file changed, 1 insertion(+)
  14.  create mode 100644 foo/a
  15. $ git checkout -b b
  16. Switched to a new branch 'b'
  17. $ echo b > foo/b
  18. $ git add foo
  19. $ git commit -m b
  20. [b ef4fa31] b
  21.  1 file changed, 1 insertion(+)
  22.  create mode 100644 foo/b
  23. $ git checkout master
  24. Switched to branch 'master'
  25. $ mkdir src
  26. $ mv foo src/
  27. $ git add src foo
  28. $ git commit -v -m 'Move foo/ to src/foo/'
  29. [master ce24248] Move foo/ to src/foo/
  30.  1 file changed, 0 insertions(+), 0 deletions(-)
  31.  rename {foo => src/foo}/a (100%)
  32. $ git checkout b
  33. Switched to branch 'b'
  34. $ git merge master
  35. CONFLICT (file location): foo/b added in HEAD inside a directory that was renamed in master, suggesting it should perhaps be moved to src/foo/b.
  36. Automatic merge failed; fix conflicts and then commit the result.
  37. $ git status
  38. On branch b
  39. You have unmerged paths.
  40.   (fix conflicts and run "git commit")
  41.   (use "git merge --abort" to abort the merge)
  42.  
  43. Changes to be committed:
  44.  
  45.     deleted:    foo/b
  46.     renamed:    foo/a -> src/foo/a
  47.  
  48. Unmerged paths:
  49.   (use "git add <file>..." to mark resolution)
  50.  
  51.     added by us:     src/foo/b
  52.  
  53. $
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top