This workflow might be useful for you if:
- you work on multiple features/bugs at a time
- you do not have write permission at the qgis repository(you can only issue pull requests).
This workflow is strictly branch based. That is, you are never going to do any real work in master.
- Login to GitHub
- Fork the project at https://github.com/qgis/qgis by clicking “Fork”. This may take a while
- Create a local folder and switch to it
- Create a working copy of the latest qgis source in this local folder
- Now we tell git that this local repository belongs to the real qgis repository. We do this by specifying upstream.
- Bring your master branch up to date with the latest changes in Qgis Repository.
git checkout master git fetch upstream git rebase upstream/master
- Now Create a branch from master branch.
- Do you work modifying source code and commit often as you like.
- Make more changes and follow-up with more git commits.
- A few days might have gone by since your creation of this branch. Now you want to make this branch up to date with the latest in server.
- come back to your branch and update all changes from master to this branch
- more commits(git commit -m “etc..”)
- Some experienced devs would review your pull request and might ask you to change something. You just make the changes again
in your branch followed by commits. Again update master and rebase with master.
Update your pull request by pushing to your branch:git push origin myBranch
Now the changes would be visible in your current pull request.
mkdir qgisdev cd qgisdevgit
git clone git@github.com:YOURNAME/Quantum-GIS.git
git remote add upstream https://github.com/qgis/Quantum-GIS.git
git checkout -b myBranch
git commit -m "work started"
git checkout master git fetch upstream git rebase upstream/master
git checkout myBranch git rebase master
now you see that you are ready to issue a pull request..
update master again as we did previously and follow it by a rebase -i to format your commit comments.
git rebase master -i git push origin myBranch
now you can issue a pull request from github website.
Hi, fyi, here is (about the same) workflow in other words from Nathan Woodrow, adding some extra information:
http://nathanw.net/2013/02/05/my-qgis-git-workflow/