Check-in at local events, earn badges, and redeem them for real rewards.
$ git clone https://github.com/
$ cd event-app
$ git remote add upstream https://github.com/
$ git fetch upstream
$ git rebase upstream/master$ git checkout -b feature_x
(make changes)
$ git status
$ git add .
$ git commit -a -m "descriptive commit message for your changes"The
-bspecifies that you want to create a new branch calledfeature_x. You only specifiy-bthe first time you checkout because you are creating a new branch. Once thefeature_xbranch exists you can later switch to it with onlygit checkout feature_x.
$ git checkout master
$ git fetch upstream
$ git rebase upstream/master
$ git checkout feature_x
$ git rebase masterNow your
feature_xis up-to-date with the upstream code.
IMPORTANT: Make sure you have rebased your
feature_xbranch to include the latest code fromupstream/masterbefore you do this.
$ git push origin master
$ git push origin feature_xNow that feature_x is up to date, and has been pushed to your fork, you can initiate the pull request.
To initiate the pull request, do the following:
- In your browser, navigate to your forked repository
- Click the new button called 'Compare & pull request' that showed up just above the main area in your forked repository
- Validate the pull request will be into the upstream
masterbranch and will be from yourfeature_xbranch - Enter a detailed description of the work you have done and then click 'Send pull request'
Once the feature_x branch has been commited into the upstream/master branch, your local feature_x branch and the origin/feature branch are no longer needed. If you want to make additional changes, restart the process with a new branch.
IMPORTANT: Make sure that your changes are in
upstream/masterbefore you delete yourfeature_xandorigin/feature_xbranches!
$ git checkout master
$ git branch -D feature_x
$ git push origin :feature_x