Skip to content

Detailed Git workflow by TheCodeJunkie

DavidBurela edited this page Jan 14, 2012 · 2 revisions

A great guide on the workflow of using Git can be found here https://github.com/NancyFx/Nancy/wiki/Git-Workflow

Here is a more detailed explanation by @TheCodeJunkie

git checkout master
git pull upstream master
git checkout -b featurebranch-123

...do stuff and commit ...

git checkout master
git pull upstream master
git checkout featurebranch-123
git rebase master
git pull origin featurebranch-123
send pull request
origin = my fork
upstream = the main repo
you add upstream by doing
git remote add upstream <url>

so make sure you have latest master.. branch of that.. work... before you push you make sure master is insync by pulling it.. switch back to your feature branch and rebase it over master.. then push to your fork and send the pull request from there ALWAYS use feature branches pretty much NEVER commit to master

Clone this wiki locally