-
Notifications
You must be signed in to change notification settings - Fork 11
Contributing
First off, you need to fork the original FeatureBook repository. Forking the repository allows you to freely experiment with changes without affecting the original project.
Once it's done, you can use the forked repository to propose changes or fix bugs by changing code and submitting a pull request to the project owners. If we like it, we might pull your fix into the original repository.
It's a good practice to regularly sync your fork with the upstream repository (upstream repository or simply upstream is a fancy name for the original repository). Before you can sync, you must configure a remote that points to the upstream.
I assume that you already have the local clone of your fork. Type git remote -v
to see the currently configured remote
repositories for your fork:
$ git remote -v
origin https://github.com/banczi/featurebook.git (fetch)
origin https://github.com/banczi/featurebook.git (push)
To configure upstream remote repository:
$ git remote add upstream https://github.com/SOFTWARE-CLINIC/featurebook.git
To verify the new upstream repository:
$ git remote -v
origin https://github.com/banczi/featurebook.git (fetch)
origin https://github.com/banczi/featurebook.git (push)
upstream https://github.com/SOFTWARE-CLINIC/featurebook.git (fetch)
upstream https://github.com/SOFTWARE-CLINIC/featurebook.git (push)
Now, you can keep your fork synced with the upstream repository with a few Git commands.
To fetch the branches and their respective commits:
$ git fetch upstream
remote: Counting objects: 77, done.
remote: Compressing objects: 100% (71/71), done.
remote: Total 77 (delta 30), reused 1 (delta 0), pack-reused 0
Unpacking objects: 100% (77/77), done.
From https://github.com/SOFTWARE-CLINIC/featurebook
* [new branch] master -> upstream/master
* [new tag] v0.0.8 -> v0.0.8
Note that commits to master
will be stored in a local branch, upstream/master
.
Merge the changes from upstream/master
into your local master
branch. This brings your fork's master
branch into
sync with the upstream repository, without losing your local changes.
$ git merge upstream/master
Syncing your fork only updates your local copy of the repository. To update your fork on GitHub, you must push your changes.
$ git push -u origin master