0.2.5 • Published 12 years ago
git-fb v0.2.5
GitHub Flow Commands (feature-branch helpers)
Bash Commands
git fb new-feature
git sync
git pullr "title" "description"
git done
git boom
below provided by git-wip (included):
git wip
git unwip
git resume some-feature
Requirements
Node.js - Download here
How to Install
$ npm install -g git-fbSetup
If you want to setup you integration branch as something other than master use the following command:
$ git config gitfb.integrationBranch <integration-branch> # defaults to master
$ git config user.name <github-username> # not emailDocumentation
git fb new-feature
$ git fb <new-feature-branch>- creates a new branch off of the integration branch
- if on integration branch
git stashelsegit wip* see git-wip below - checks out the integration branch
- pulls down the integration branch from origin
- creates a branch with the name specified
- checks out the newly created branch
- pushes branch to origin
- if coming from integration branch and had stashed
git stash pop
- if on integration branch
$ git fb <new-feature-branch> <source-branch>- creates a new branch off of the source branch
- if on source branch
git stashelsegit wip - git fetch origin (to fetch branches from origin)
- checks out the source branch
- pulls down the source branch from origin
- creates a branch with the name specified
- checks out the newly created branch
- pushes branch to origin
- if coming from source branch and had stashed
git stash pop
- if on source branch
git sync
$ git sync- pulls and merges the current branch to the latest integration branch (set as gitfb.integrationBranch or master)
- checks out the integration branch
- pulls down the integration branch from origin
- checks out the current branch again
- merges the integration branch into current branch
- commits automerge, if successful (else you manually merge and push on your own)
- pushes the current branch to origin
$ git sync <branch-to-sync-with>- same as git sync except you can specify the branch you'd like to "sync" with
git pullr "title" "description"
$ git pullr <title> <description>- pull requests to integration branch (set as gitfb.integrationBranch or master)
$ git pullr <title> <description> <branch-to-pull-request-to>- you can specify the branch to pull-request into, just remember it is the third parameter; so description is required
git done
$ git done- merges into default integration branch (set as gitfb.integrationBranch or master)
- checks out the integration branch
- merges the current branch
- commits automerge, if successful (else you manually merge and push on your own)
- deletes current branch locally
- deletes current branch on origin
- pushes integration branch to origin
$ git done <branch-to-merge-into>- same as git done but you can specify the branch to merge into
git boom some-feature
$ git boom <branch-to-delete>- deletes branch locally and remotely
Commands provided by git-wip:
git wip
$ git wip- alias for
git add .; git commit -m __wip;
git unwip
$ git unwip- checks if last commit is a wip and
git reset HEAD^
git resume
$ git resume <branch>- alias for
git checkout <branch>; git unwip;
License
MIT
