Skip to content

Instantly share code, notes, and snippets.

@DavidSouther
Last active December 17, 2015 01:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidSouther/5526036 to your computer and use it in GitHub Desktop.
Save DavidSouther/5526036 to your computer and use it in GitHub Desktop.
[git-top-down]$ git hub-clone
/home/southerd/.ghf/bin/git-hub-clone <org/repo>: Initialize a new working repository, and set git-hubflow configurations.
<org/repo>: The organization and repository name to clone from.
[git-top-down]$ git hub-clone github-flow/recipes
Fork at https://github.com/DavidSouther/recipes
Project cloned into /home/southerd/devel/southerd/git-top-down/recipes
[git-top-down]$ cd recipes/
[recipes (master)]$ ls
README.md
[recipes (master)]$ cat README.md
recipes
=======
Sandbox repo for playing with github-flow commands.
[recipes (master)]$ git feature start potatoes
No local changes to save
Switched to a new branch 'potatoes'
No stash found.
[recipes (potatoes)]$ cat > potatoes <<EOF
> 1/2 pound red potatoes
> 1 gala apple
> 1/4 quart half-and-half
> 2 tbsp butter
> salt
>
> Cube potatoes. Add potatoes and some salt to cold water. Bring water to boil. Let boil 5 minutes. Cube apples, add. Let boil 10 minutes. Drain. Add milk and butter, then mash. Add salt and pepper to taste.
> EOF
[recipes (potatoes)]$ git status
# On branch potatoes
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# potatoes
nothing added to commit but untracked files present (use "git add" to track)
[recipes (potatoes)]$ git add potatoes
[recipes (potatoes)]$ git status
# On branch potatoes
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: potatoes
#
[recipes (potatoes)]$ git add potatoes
[recipes (potatoes)]$ git commit -m 'Added recipe for mashed potatoes.'
[potatoes 5b4aa4f] Added recipe for mashed potatoes.
1 file changed, 7 insertions(+)
create mode 100644 potatoes
[recipes (potatoes)]$ git feature review
Switched to branch 'master'
Rebasing upstream updates into master...
Current branch master is up to date.
Rebasing master into potatoes...
No stash found.
Forcing updates to https://github.com/DavidSouther/recipes/tree/potatoes
Pull request is at http://github.com/github-flow/recipes/pull/1
[recipes (potatoes)]$ ed potatoes <<EOF
> 5 ; s/$/, pepper/
> 7 ; s/$/ Salt, pepper to taste./
> w
> q
> EOF
256
287
[recipes (potatoes)]$ git status
# On branch potatoes
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: potatoes
#
no changes added to commit (use "git add" and/or "git commit -a")
[recipes (potatoes)]$ git diff
diff --git a/potatoes b/potatoes
index 3068a62..f11e06d 100644
--- a/potatoes
+++ b/potatoes
@@ -2,6 +2,6 @@
1 gala apple
1/4 quart half-and-half
2 tbsp butter
-salt
+salt, pepper
-Cube potatoes. Add potatoes and some salt to cold water. Bring water to boil. Let boil 5 minutes. Cube apples, add. Let boil 10 minutes. Drain. Add milk and butter, then mash.
+Cube potatoes. Add potatoes and some salt to cold water. Bring water to boil. Let boil 5 minutes. Cube apples, add. Let boil 10 minutes. Drain. Add milk and butter, then mash. Salt, pepper to taste.
[recipes (potatoes)]$ git add potatoes
[recipes (potatoes)]$ git commit -m 'Added salt and pepper to taste.'
[potatoes 9a6747f] Added salt and pepper to taste.
1 file changed, 2 insertions(+), 2 deletions(-)
[recipes (potatoes)]$ git feature review
Switched to branch 'master'
Rebasing upstream updates into master...
Current branch master is up to date.
Rebasing master into potatoes...
No stash found.
Forcing updates to https://github.com/DavidSouther/recipes/tree/potatoes
Pull request is at http://github.com/github-flow/recipes/pull/1
[recipes (potatoes)]$ # Look at the PR
[recipes (potatoes)]$ git feature finish
Switched to branch 'master'
Rebasing upstream updates into master...
Current branch master is up to date.
Rebasing master into potatoes...
No stash found.
Forcing updates to https://github.com/DavidSouther/recipes/tree/potatoes
Pull request 1 successfully merged.
No stash found.
First, rewinding head to replay your work on top of it...
Fast-forwarded master to 7b3777ec821d0253dc231ab900849c09cd3b600e.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment