Advertisement
Guest User

git subtree woes

a guest
Nov 4th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. jchase@tethys testing $ git init .
  2. Initialized empty Git repository in /tmp/testing/.git/
  3. jchase@tethys testing $ git commit -m "root" --allow-empty
  4. [master (root-commit) 1c17895] root
  5. jchase@tethys testing $ mkdir sub/tree -p
  6. jchase@tethys testing $ touch sub/this
  7. tjchase@tethys testing $ touch sub/tree/that
  8. jchase@tethys testing $ git add sub/this
  9. jchase@tethys testing $ git commit -m "this"
  10. [master ebb2e3c] this
  11. 1 file changed, 0 insertions(+), 0 deletions(-)
  12. create mode 100644 sub/this
  13. jchase@tethys testing $ git add sub/tree/that
  14. jchase@tethys testing $ git commit -m "that"
  15. [master 0ea4e02] that
  16. 1 file changed, 0 insertions(+), 0 deletions(-)
  17. create mode 100644 sub/tree/that
  18. jchase@tethys testing $ git subtree split --prefix sub --branch subtree
  19. Created branch 'subtree'
  20. e586a79d441cd086e9bd9287353857e9d7f1dcdc
  21. jchase@tethys testing $ git checkout subtree
  22. Switched to branch 'subtree'
  23. jchase@tethys testing $ mkdir tree/branch
  24. jchase@tethys testing $ touch tree/branch/leaf
  25. jchase@tethys testing $ git add tree/branch/leaf
  26. jchase@tethys testing $ git commit -m "leaf"
  27. [subtree e612d63] leaf
  28. 1 file changed, 0 insertions(+), 0 deletions(-)
  29. create mode 100644 tree/branch/leaf
  30. jchase@tethys testing $ git checkout master
  31. Switched to branch 'master'
  32. jchase@tethys testing $ git subtree merge -P sub subtree
  33. fatal: refusing to merge unrelated histories
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement