-
-
Notifications
You must be signed in to change notification settings - Fork 17
Workflow
- Fork the repo by clicking the Fork button on the repo's github page
- Clone the repo and set it up so that it pulls from the upstream (BloomBooks) repo but pushes to your forked repo:
Run the following commands:
git clone https://github.com/BloomBooks/BloomDesktop.git
cd BloomDesktop
git config remote.origin.pushurl [email protected]:<githubusername>/BloomDesktop.git
- Configure your local repo so that you get notified about whitespace problems when you try to commit:
Run the following command:
git config core.whitespace space-before-tab,indent-with-non-tab,blank-at-eol,tabwidth=4
It's easiest if you work on a topic branch. To make it easier to find your topic branches in the list of existing branches you might want to add a common prefix like feature/ or topic/. When the change is ready you commit, push to your forked repo and create a pull request. Afterwards you pull from the upstream repo.
# create topic branch
git checkout -b feature/ImplementFoo
# hack away
# commit change
git add mynewfile
git commit -m "Implement new feature foo"
# upload to your forked repo
git push origin feature/ImplementFoo:feature/ImplementFoo
Once you pushed your change to your forked repo on GitHub you can create a pull request on the github page of your forked repo: in the right column click on Pull Requests, then click the button New pull request.
The top line now shows on the left the target repo and branch (base fork and base) where the changes will end up, and to the right the source repo and branch (head fork and compare). Click the Edit button to change those. The base fork should be BloomBooks/BloomDesktop
, base branch the branch where your changes should end up, e.g. linux
. Head fork should be your forked repo and compare your topic branch.
GitHub should now show just the commits you made. Click Click to create a pull request for this comparison and then the Send pull request button.
The pull request is now visible on the upstream repo and can be reviewed there.
If you need to modify your change simply create a new commit a push that. It will automatically be included in your pull request.
NOTE: If you've used Gerrit before you might be tempted to amend a change that is up for code review. However, don't amend a change that is already part of an open pull request! This might cause review comments and the review history to disappear...
Once the code is reviewed and accepted the pull request can be merged into the upstream repo, either on the GitHub site or locally. The person doing the merge should delete the topic branch by clicking the Delete branch button on the pull request page on GitHub.
It might be good to delete the topic branch after the pull request got closed. You can do this by running these commands:
git checkout master
# delete local topic branch
git branch -D feature/ImplementFoo
# delete topic branch on forked repo
git push origin :feature/ImplementFoo