Here is how to setup your project for contributions.
- Visit https://github.com/wuest-halle/wuestbot
- Click the
Fork
button (top right) to create a personal fork.
First make sure you have created an SSH key and uploaded it on Github via Profile > Settings > SSH and GPG keys.
Set user
to match your Github profile name:
export user="your github user name"
Create your clone:
git clone git@github.com:$user/wuestbot.git
# or: git clone https://github.com/$user/wuestbot.git
cd wuestbot
git remote add upstream git@github.com:wuest-halle/wuestbot.git
# or: git remote add upstream https://github.com/wuest-halle/wuestbot.git
# Never push to upstream/master
git remote set-url --push upstream no_push
# Confirm your remotes make sense
git remote -v
Get your local master
up to date:
cd wuestbot
git fetch upstream
git checkout master
git rebase upstream/master
Then create a feature branch from it:
git checkout -b my_feature
You can then edit the code on the my_feature
branch.
When changes have been merged into upstream/master
while you were developing
on my_feature
, you need to sync up your feature branch:
# While on my_feature branch
git fetch upstream
git rebase upstream/master
This way you can also sync the master
branch of your local fork (origin
)
with upstream/master
.
After you have added your changes to the staging directory, commit them:
git commit
Please write a well-formed commit message.
When you're ready to review, push your branch to Github:
You will need to force-push (
-f
) when you rebased your branch previously.
git push -f origin my_feature
- Visit your for at `https://github.com/$user/wuestbot
- Click the
Compare & Pull Request
button next to yourmy_feature
branch. - Write a descriptive PR message.
- Assign one (or more) of the authors to review your PR.