Skip to content

Instantly share code, notes, and snippets.

@kamilogorek
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kamilogorek/b7d3682af00a5ada17bc to your computer and use it in GitHub Desktop.
Save kamilogorek/b7d3682af00a5ada17bc to your computer and use it in GitHub Desktop.
Hub Workflow Snippets
$ git remote add <username> <fork-url>
$ git fetch <username>
$ git checkout <PR-branch-name>
$ git remote add <username> <fork-url>
$ git fetch <username>
times number of forks you want to add
$ brew install hub
$ alias git=hub
$ git clone https://github.com/github/hub.git && cd $_
$ rake install prefix=/usr/local
$ alias git=hub
$ git pull-request -m "Fix for slow workflow process" -b <username>/<repo> -h <your-fork>/<repo>
$ git push <username> <branch-name>
$ git pull-request -m "Fix for slow workflow process"
$ git branch -m origin upstream
$ git branch -m <username> origin
Go to github.com, create a new repository.
Either clone newly created repository or `$ git init` locally and then `$ git remote add upstream <repo-url>`.
$ git add -A
$ git commit -m "Init commit"
$ git push upstream master
Go to github.com/<username>/<repo> and fork repository manually.
$ git remote add <username> <fork-url> or $ git remote add origin <fork-url> (if you use origin/upstream naming convention)
$ git init
$ git add -A
$ git commit -m "Init commit"
$ git create -d "Brand new project" (this will create repository with the same name as current directory)
$ git push origin master
$ git fork
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment