Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % git checkout b1
- error: pathspec 'b1' did not match any file(s) known to git.
- % git checkout -b b1
- Switched to a new branch 'b1'
- % git push origin b1
- Total 0 (delta 0), reused 0 (delta 0)
- To file:///tmp/crap.git
- * [new branch] b1 -> b1
- % git pull --rebase
- There is no tracking information for the current branch.
- Please specify which branch you want to rebase against.
- See git-pull(1) for details.
- git pull <remote> <branch>
- If you wish to set tracking information for this branch you can do so with:
- git branch --set-upstream-to=origin/<branch> b1
- % git branch --set-upstream-to=origin/b1 b1
- Branch b1 set up to track remote branch b1 from origin.
- % git pull --rebase
- Current branch b1 is up to date.
- % git checkout master
- Switched to branch 'master'
- Your branch is up-to-date with 'origin/master'.
- % git checkout -b b2
- Switched to a new branch 'b2'
- % git branch --set-upstream-to=origin/b2 b2
- error: the requested upstream branch 'origin/b2' does not exist
- hint:
- hint: If you are planning on basing your work on an upstream
- hint: branch that already exists at the remote, you may need to
- hint: run "git fetch" to retrieve it.
- hint:
- hint: If you are planning to push out a new local branch that
- hint: will track its remote counterpart, you may want to use
- hint: "git push -u" to set the upstream config as you push.
- % git push origin b2
- Total 0 (delta 0), reused 0 (delta 0)
- To file:///tmp/crap.git
- * [new branch] b2 -> b2
- % git branch --set-upstream-to=origin/b2 b2
- Branch b2 set up to track remote branch b2 from origin.
- % git pull --rebase
- Current branch b2 is up to date.
- % touch a b c
- % git add a b c
- % git commit -a
- [b2 0313b0c] add a b c
- 3 files changed, 0 insertions(+), 0 deletions(-)
- create mode 100644 a
- create mode 100644 b
- create mode 100644 c
- % git push origin
- Counting objects: 2, done.
- Delta compression using up to 8 threads.
- Compressing objects: 100% (2/2), done.
- Writing objects: 100% (2/2), 240 bytes | 0 bytes/s, done.
- Total 2 (delta 0), reused 0 (delta 0)
- To file:///tmp/crap.git
- 05572d5..0313b0c b2 -> b2
- % git checkout b1
- Switched to branch 'b1'
- Your branch is up-to-date with 'origin/b1'.
- % echo this was the first one > first
- % git add first
- % git commit -a
- [b1 436dd38] set up b1
- 1 file changed, 1 insertion(+)
- create mode 100644 first
- % git push
- Counting objects: 3, done.
- Delta compression using up to 8 threads.
- Compressing objects: 100% (2/2), done.
- Writing objects: 100% (3/3), 291 bytes | 0 bytes/s, done.
- Total 3 (delta 0), reused 0 (delta 0)
- To file:///tmp/crap.git
- 05572d5..436dd38 b1 -> b1
- % git log | more
- commit 436dd3892cd7420dcd7eff487a95860fe3cb4d57
- Date: Mon Feb 6 08:54:42 2017 -0800
- set up b1
- commit 05572d5a3a8b4038297920d1297f0d1961b1776e
- Date: Mon Feb 6 08:51:23 2017 -0800
- start
- % git checkout b2
- Switched to branch 'b2'
- Your branch is up-to-date with 'origin/b2'.
- % ls
- a b c empty
- % git merge 436dd3892cd7420dcd7eff487a95860fe3cb4d57
- Merge made by the 'recursive' strategy.
- first | 1 +
- 1 file changed, 1 insertion(+)
- create mode 100644 first
- % git push origin
- Counting objects: 2, done.
- Delta compression using up to 8 threads.
- Compressing objects: 100% (2/2), done.
- Writing objects: 100% (2/2), 291 bytes | 0 bytes/s, done.
- Total 2 (delta 1), reused 0 (delta 0)
- To file:///tmp/crap.git
- 0313b0c..e7cf7db b2 -> b2
- % git log | more
- commit e7cf7dbff37ffafc98720972a38cd11545be41c4
- Merge: 0313b0c 436dd38
- Date: Mon Feb 6 08:55:57 2017 -0800
- Merge commit '436dd3892cd7420dcd7eff487a95860fe3cb4d57' into b2
- commit 436dd3892cd7420dcd7eff487a95860fe3cb4d57
- Date: Mon Feb 6 08:54:42 2017 -0800
- set up b1
- commit 0313b0c4ee75aeb298f67e584771ce391c45a028
- Date: Mon Feb 6 08:53:34 2017 -0800
- add a b c
- commit 05572d5a3a8b4038297920d1297f0d1961b1776e
- Date: Mon Feb 6 08:51:23 2017 -0800
- % ls
- a b c empty first
- % git status | more
- On branch b2
- Your branch is up-to-date with 'origin/b2'.
- nothing to commit, working tree clean
- % git checkout 436dd3892cd7420dcd7eff487a95860fe3cb4d57
- Note: checking out '436dd3892cd7420dcd7eff487a95860fe3cb4d57'.
- 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 436dd38... set up b1
- % ls
- empty first
- % git status | more
- HEAD detached at 436dd38
- nothing to commit, working tree clean
- % ls
- empty first
- % git log | more
- commit 436dd3892cd7420dcd7eff487a95860fe3cb4d57
- Date: Mon Feb 6 08:54:42 2017 -0800
- set up b1
- commit 05572d5a3a8b4038297920d1297f0d1961b1776e
- Date: Mon Feb 6 08:51:23 2017 -0800
- start
- % git checkout b2
- Previous HEAD position was 436dd38... set up b1
- Switched to branch 'b2'
- Your branch is up-to-date with 'origin/b2'.
- % git log | more
- commit e7cf7dbff37ffafc98720972a38cd11545be41c4
- Merge: 0313b0c 436dd38
- Date: Mon Feb 6 08:55:57 2017 -0800
- Merge commit '436dd3892cd7420dcd7eff487a95860fe3cb4d57' into b2
- commit 436dd3892cd7420dcd7eff487a95860fe3cb4d57
- Date: Mon Feb 6 08:54:42 2017 -0800
- set up b1
- commit 0313b0c4ee75aeb298f67e584771ce391c45a028
- Date: Mon Feb 6 08:53:34 2017 -0800
- add a b c
- commit 05572d5a3a8b4038297920d1297f0d1961b1776e
- Date: Mon Feb 6 08:51:23 2017 -0800
- %
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement