Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

Git Pull Request Policy

Yu-Jen Lin edited this page Apr 28, 2017 · 1 revision

!!! Please make sure your pull request follows our master, and no conflict !!!

Some useful hint:

1. After you fork this repository, add this repository as upstream

git remote add upstream https://github.com/yjlinyw/comic-reader
# or
git remote add upstream [email protected]:yjlintw/comic-reader.git

2. When you want to develop a new feature or fix a bug, always make sure your master is up-to-date with our master

any branch> git checkout master # switch back to master
master> git fetch upstream # grab new data from upstream
master> git merge upstream/master # update your master with upstream/master
master> git push origin master # push your master to remote

By doing this, it will make sure your original/master & master is in-sync with upstream/master

Then you can create a new branch from master and start doing your development

master> git checkout -b new-feature

3. After you finish the new feature, push it back to origin/new-feature

new-feature> git push origin new-feature

4. Before making the Pull-Request, make sure your new-feature branch is still in-sync with upstream master

new-feature> git fetch upstream
new-feature> git rebase upstream/master # There might be conflict at this point
# <resolve conflict>
new-feature> git add .
new-feature> git rebase --continue
# <until there is no conflict, and the rebase is done>
new-feature> git push origin new-feature

Now you can make a Pull-Request

5. Update you master branch to keep it in-sync with upstream/master after the Pull-Request got merged (or anytime, really)

It is actually same as point 2.

any branch> git checkout master # switch back to master
master> git fetch upstream # grab new data from upstream
master> git merge upstream/master # update your master with upstream/master
master> git push origin master # push your master to remote