Created
December 16, 2009 19:55
-
-
Save tmountain/258113 to your computer and use it in GitHub Desktop.
This file contains 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
travis@travis-desktop:/tmp$ mkdir gittest | |
travis@travis-desktop:/tmp$ cd gittest | |
travis@travis-desktop:/tmp/gittest$ git init | |
Initialized empty Git repository in /tmp/gittest/.git/ | |
travis@travis-desktop:/tmp/gittest$ echo 'foo' > foo | |
travis@travis-desktop:/tmp/gittest$ git add . | |
travis@travis-desktop:/tmp/gittest$ git commit -a -m "added foo" | |
[master (root-commit) 73f39aa] added foo | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
create mode 100644 foo | |
travis@travis-desktop:/tmp/gittest$ git co -b refactor | |
Switched to a new branch 'refactor' | |
travis@travis-desktop:/tmp/gittest$ echo 'foo bar' > foo | |
travis@travis-desktop:/tmp/gittest$ git co master | |
M foo | |
Switched to branch 'master' | |
travis@travis-desktop:/tmp/gittest$ cat foo | |
foo bar | |
travis@travis-desktop:/tmp/gittest$ git co refactor | |
M foo | |
Switched to branch 'refactor' | |
travis@travis-desktop:/tmp/gittest$ cat foo | |
foo bar | |
travis@travis-desktop:/tmp/gittest$ git commit -a -m "changed foo" | |
[refactor 3b8e1b4] changed foo | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
travis@travis-desktop:/tmp/gittest$ git co master | |
Switched to branch 'master' | |
travis@travis-desktop:/tmp/gittest$ cat foo | |
foo | |
travis@travis-desktop:/tmp/gittest$ ls | |
foo | |
travis@travis-desktop:/tmp/gittest$ git co refactor | |
Switched to branch 'refactor' | |
travis@travis-desktop:/tmp/gittest$ cat foo | |
foo bar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment