git-helpers
Some helpful executables for working with git.
gh-co-pull
Checkout a new branch and pull from a github user - branch combination. The following pairs are equivilents.
# In some-repo:master
$ gh-co-pull tim-smart
$ git checkout -b pull/tim-smart/master && git pull \
git://github.com/tim-smart/some-repo.git master
# In some-repo:master
$ gh-co-pull tim-smart test-branch
$ git checkout -b pull/tim-smart/test-branch && git pull \
git://github.com/tim-smart/some-repo.git test-branch
git-merge-rm
Merges a branch into the current one, pushes it then deletes the branch on both the remote and local repository.
hub-pull-req
Parses the Github issue number from the current branch name (expects
'issue/xx{/blah}) then turns that issue on Github into a pull request. This
requires gem install hub
to be installed, and available as hub
.
npm-create
Create a npm / github repository with a name and dependencies. It uses the following values:
$ git config --global github.user
$ git config --global user.name
$ git config --global user.email
$ npm whoami
$ node -v
Some usage:
$ npm-create project-name some-depend=0.1.x 'request>=0.1' dev:expresso
Which would create the project "project-name" with the following package.json: (With the names etc replace with your own)
{ "name" : "project-name"
, "version" : "0.0.1"
, "author" : "Tim Smart <tim@fostle.com>"
, "description" : ""
, "engines" :
{ "node" : ">=0.9.10"
}
, "homepage" : "https://github.com/tim-smart/project-name"
, "repository" :
{ "type" : "git"
, "url" : "git://github.com/tim-smart/project-name.git"
}
, "bugs" : {
"email" : "tim@fostle.com"
, "url" : "https://github.com/tim-smart/project-name/issues"
}
, "main" : "./lib/project-name.js"
, "bin" :
{ "project-name" : "bin/project-name"
}
, "dependencies" :
{ "some-depend" : "0.1.x"
, "request" : ">=0.1"
}
, "devDependencies" :
{ "expresso" : "*"
}
}
Some recommendations
git clone git://github.com/stephencelis/ghi.git