Advertisement
Guest User

Untitled

a guest
Feb 6th, 2017
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.56 KB | None | 0 0
  1. % git checkout b1
  2. error: pathspec 'b1' did not match any file(s) known to git.
  3. % git checkout -b b1
  4. Switched to a new branch 'b1'
  5. % git push origin b1
  6. Total 0 (delta 0), reused 0 (delta 0)
  7. To file:///tmp/crap.git
  8. * [new branch] b1 -> b1
  9. % git pull --rebase
  10. There is no tracking information for the current branch.
  11. Please specify which branch you want to rebase against.
  12. See git-pull(1) for details.
  13.  
  14. git pull <remote> <branch>
  15.  
  16. If you wish to set tracking information for this branch you can do so with:
  17.  
  18. git branch --set-upstream-to=origin/<branch> b1
  19.  
  20. % git branch --set-upstream-to=origin/b1 b1
  21. Branch b1 set up to track remote branch b1 from origin.
  22. % git pull --rebase
  23. Current branch b1 is up to date.
  24. % git checkout master
  25. Switched to branch 'master'
  26. Your branch is up-to-date with 'origin/master'.
  27. % git checkout -b b2
  28. Switched to a new branch 'b2'
  29. % git branch --set-upstream-to=origin/b2 b2
  30. error: the requested upstream branch 'origin/b2' does not exist
  31. hint:
  32. hint: If you are planning on basing your work on an upstream
  33. hint: branch that already exists at the remote, you may need to
  34. hint: run "git fetch" to retrieve it.
  35. hint:
  36. hint: If you are planning to push out a new local branch that
  37. hint: will track its remote counterpart, you may want to use
  38. hint: "git push -u" to set the upstream config as you push.
  39. % git push origin b2
  40. Total 0 (delta 0), reused 0 (delta 0)
  41. To file:///tmp/crap.git
  42. * [new branch] b2 -> b2
  43. % git branch --set-upstream-to=origin/b2 b2
  44. Branch b2 set up to track remote branch b2 from origin.
  45. % git pull --rebase
  46. Current branch b2 is up to date.
  47. % touch a b c
  48. % git add a b c
  49. % git commit -a
  50. [b2 0313b0c] add a b c
  51. 3 files changed, 0 insertions(+), 0 deletions(-)
  52. create mode 100644 a
  53. create mode 100644 b
  54. create mode 100644 c
  55. % git push origin
  56. Counting objects: 2, done.
  57. Delta compression using up to 8 threads.
  58. Compressing objects: 100% (2/2), done.
  59. Writing objects: 100% (2/2), 240 bytes | 0 bytes/s, done.
  60. Total 2 (delta 0), reused 0 (delta 0)
  61. To file:///tmp/crap.git
  62. 05572d5..0313b0c b2 -> b2
  63. % git checkout b1
  64. Switched to branch 'b1'
  65. Your branch is up-to-date with 'origin/b1'.
  66. % echo this was the first one > first
  67. % git add first
  68. % git commit -a
  69. [b1 436dd38] set up b1
  70. 1 file changed, 1 insertion(+)
  71. create mode 100644 first
  72. % git push
  73. Counting objects: 3, done.
  74. Delta compression using up to 8 threads.
  75. Compressing objects: 100% (2/2), done.
  76. Writing objects: 100% (3/3), 291 bytes | 0 bytes/s, done.
  77. Total 3 (delta 0), reused 0 (delta 0)
  78. To file:///tmp/crap.git
  79. 05572d5..436dd38 b1 -> b1
  80. % git log | more
  81. commit 436dd3892cd7420dcd7eff487a95860fe3cb4d57
  82. Date: Mon Feb 6 08:54:42 2017 -0800
  83.  
  84. set up b1
  85.  
  86. commit 05572d5a3a8b4038297920d1297f0d1961b1776e
  87. Date: Mon Feb 6 08:51:23 2017 -0800
  88.  
  89. start
  90. % git checkout b2
  91. Switched to branch 'b2'
  92. Your branch is up-to-date with 'origin/b2'.
  93. % ls
  94. a b c empty
  95. % git merge 436dd3892cd7420dcd7eff487a95860fe3cb4d57
  96. Merge made by the 'recursive' strategy.
  97. first | 1 +
  98. 1 file changed, 1 insertion(+)
  99. create mode 100644 first
  100. % git push origin
  101. Counting objects: 2, done.
  102. Delta compression using up to 8 threads.
  103. Compressing objects: 100% (2/2), done.
  104. Writing objects: 100% (2/2), 291 bytes | 0 bytes/s, done.
  105. Total 2 (delta 1), reused 0 (delta 0)
  106. To file:///tmp/crap.git
  107. 0313b0c..e7cf7db b2 -> b2
  108. % git log | more
  109. commit e7cf7dbff37ffafc98720972a38cd11545be41c4
  110. Merge: 0313b0c 436dd38
  111. Date: Mon Feb 6 08:55:57 2017 -0800
  112.  
  113. Merge commit '436dd3892cd7420dcd7eff487a95860fe3cb4d57' into b2
  114.  
  115. commit 436dd3892cd7420dcd7eff487a95860fe3cb4d57
  116. Date: Mon Feb 6 08:54:42 2017 -0800
  117.  
  118. set up b1
  119.  
  120. commit 0313b0c4ee75aeb298f67e584771ce391c45a028
  121. Date: Mon Feb 6 08:53:34 2017 -0800
  122.  
  123. add a b c
  124.  
  125. commit 05572d5a3a8b4038297920d1297f0d1961b1776e
  126. Date: Mon Feb 6 08:51:23 2017 -0800
  127.  
  128. % ls
  129. a b c empty first
  130. % git status | more
  131. On branch b2
  132. Your branch is up-to-date with 'origin/b2'.
  133. nothing to commit, working tree clean
  134. % git checkout 436dd3892cd7420dcd7eff487a95860fe3cb4d57
  135. Note: checking out '436dd3892cd7420dcd7eff487a95860fe3cb4d57'.
  136.  
  137. You are in 'detached HEAD' state. You can look around, make experimental
  138. changes and commit them, and you can discard any commits you make in this
  139. state without impacting any branches by performing another checkout.
  140.  
  141. If you want to create a new branch to retain commits you create, you may
  142. do so (now or later) by using -b with the checkout command again. Example:
  143.  
  144. git checkout -b <new-branch-name>
  145.  
  146. HEAD is now at 436dd38... set up b1
  147. % ls
  148. empty first
  149. % git status | more
  150. HEAD detached at 436dd38
  151. nothing to commit, working tree clean
  152. % ls
  153. empty first
  154. % git log | more
  155. commit 436dd3892cd7420dcd7eff487a95860fe3cb4d57
  156. Date: Mon Feb 6 08:54:42 2017 -0800
  157.  
  158. set up b1
  159.  
  160. commit 05572d5a3a8b4038297920d1297f0d1961b1776e
  161. Date: Mon Feb 6 08:51:23 2017 -0800
  162.  
  163. start
  164. % git checkout b2
  165. Previous HEAD position was 436dd38... set up b1
  166. Switched to branch 'b2'
  167. Your branch is up-to-date with 'origin/b2'.
  168. % git log | more
  169. commit e7cf7dbff37ffafc98720972a38cd11545be41c4
  170. Merge: 0313b0c 436dd38
  171. Date: Mon Feb 6 08:55:57 2017 -0800
  172.  
  173. Merge commit '436dd3892cd7420dcd7eff487a95860fe3cb4d57' into b2
  174.  
  175. commit 436dd3892cd7420dcd7eff487a95860fe3cb4d57
  176. Date: Mon Feb 6 08:54:42 2017 -0800
  177.  
  178. set up b1
  179.  
  180. commit 0313b0c4ee75aeb298f67e584771ce391c45a028
  181. Date: Mon Feb 6 08:53:34 2017 -0800
  182.  
  183. add a b c
  184.  
  185. commit 05572d5a3a8b4038297920d1297f0d1961b1776e
  186. Date: Mon Feb 6 08:51:23 2017 -0800
  187.  
  188. %
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement