Created
December 21, 2011 01:48
-
-
Save brettbuddin/1504180 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
$ git checkout topic | |
$ git cherry master | |
- 31e27cc5bf02c7b145340a13c9874f729e5bec01 | |
+ 9cf4af52e76adec45a5d63317bce344609406e89 |
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
$ git init | |
Initialized empty Git repository in /Users/brettbuddin/Code/cherry-example/.git/ | |
$ touch README | |
$ echo "Hello World" > README | |
$ git add . | |
$ git commit -m "First." | |
[master (root-commit) a5a3aec] First. | |
1 files changed, 1 insertions(+), 0 deletions(-) | |
create mode 100644 README | |
$ git branch topic | |
$ git checkout topic | |
Switched to branch 'topic' | |
$ echo "Hello World. This is a test." > README | |
$ git add . | |
$ git commit -m "Second." | |
[topic 31e27cc] Second. | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
$ echo "Hello World. This is a test. Yup." > README | |
$ git add . | |
$ git commit -m "Third." | |
[topic 9cf4af5] Third. | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
$ git checkout master | |
Switched to branch 'master' | |
$ echo "Hello World. This is a test." > README | |
$ git add . | |
$ git commit -m "Fourth." | |
[master d48dd31] Fourth. | |
1 files changed, 1 insertions(+), 1 deletions(-) |
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
$ git log master..topic --pretty=oneline | |
9cf4af52e76adec45a5d63317bce344609406e89 Third. | |
31e27cc5bf02c7b145340a13c9874f729e5bec01 Second. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment