Created
May 25, 2010 21:11
-
-
Save horatio-sans-serif/413698 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/tmp ⚡ mkdir foo | |
/tmp ⚡ cd foo | |
/tmp/foo ⚡ git init | |
Initialized empty Git repository in /private/tmp/foo/.git/ | |
/tmp/foo ⚡ echo "x" > x | |
/tmp/foo ⚡ git add x | |
/tmp/foo ⚡ git commit -m "add x" x | |
[master (root-commit) 583fb7e] add x | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
create mode 100644 x | |
/tmp/foo(master) ⚡ git checkout -b bar | |
Switched to a new branch 'bar' | |
/tmp/foo(bar) ⚡ ls | |
x | |
/tmp/foo(bar) ⚡ echo "y" > y | |
/tmp/foo(bar) ⚡ git add y | |
/tmp/foo(bar) ⚡ git commit -m "add y" y | |
[bar 3906d20] add y | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
create mode 100644 y | |
/tmp/foo(bar) ⚡ ls | |
x y | |
/tmp/foo(bar) ⚡ git checkout master | |
Switched to branch 'master' | |
/tmp/foo(master) ⚡ ls | |
x | |
/tmp/foo(master) ⚡ git branch -a | |
bar | |
* master | |
/tmp/foo(master) ⚡ git checkout bar | |
Switched to branch 'bar' | |
/tmp/foo(bar) ⚡ echo "x" >> x | |
/tmp/foo(bar) ⚡ git co master | |
M x | |
Switched to branch 'master' | |
/tmp/foo(master) ⚡ cat x | |
xx | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment