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
-b
specifies that you want to create a new branch calledfeature_x
. You only specifiy-b
the first time you checkout because you are creating a new branch. Once thefeature_x
branch 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 master
Now your
feature_x
is up-to-date with the upstream code.
IMPORTANT: Make sure you have rebased your
feature_x
branch to include the latest code fromupstream/master
before you do this.
$ git push origin master
$ git push origin feature_x
Now 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
master
branch and will be from yourfeature_x
branch - 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/master
before you delete yourfeature_x
andorigin/feature_x
branches!
$ git checkout master
$ git branch -D feature_x
$ git push origin :feature_x