Follow the below instructions
This checklist also serves as table of contents.
- Fork the project
- Clone your fork
- Set up your fork
- Update your fork
- Create a branch
- Work on your contribution
- Pull request
- Code review
- Follow up
The first step is to fork the IsabelaFunctions project. This is done by clicking the Fork button on the project site.
After forking the project you can clone the project to create a local working copy.
$ git clone https://github.com/YOUR_USERNAME/IsabelaFunctions.gitYou can also connect to GitHub using SSH.
Add the URL of the original project to your local repository to be able to pull changes from it:
$ git remote add upstream https://github.com/de-oliveira/IsabelaFunctions.gitListing the remote repositories will show something like:
$ git remote -v
origin https://github.com/YOUR_USERNAME/IsabelaFunctions.git (fetch)
origin https://github.com/YOUR_USERNAME/IsabelaFunctions.git (push)
upstream https://github.com/de-oliveira/IsabelaFunctions.git (fetch)
upstream https://github.com/de-oliveira/IsabelaFunctions.git (push)Make sure to pull in changes from the upstream master branch at regular intervals to keep track of changes done to the project. We recommend to use the flag. This will replay your commits on top of the latest IsabelaFunctions git master and maintain a linear history.
$ git pull upstream masterBefore starting to work on your feature or bugfix you need to create a local branch where to keep all your work. Branches help to organize the changes related to different developments in the project.
You can do that with the following git command:
$ git checkout -b BRANCH_NAMEThis will create a new branch and will make it the active one in your local repository. Be sure to use a descriptive name for the branch name.
You can check you are in the right branch using git:
$ git branch
master
* BRANCH_NAMEThe current active branch is the one with a * on the left.
Now you can start with the development of your new feature (or bug fix). During the work you can use git's commit and push mechanism to save and track your changes.
You can push those changes to your personal fork.
$ git push origin BRANCH_NAMEAfter pushing your changes to your fork navigate to the GitHub page of your work. Click on the Pull request button. Add the needed information to the web form and submit your request.
The developer team will review your changes and decide whether to accept your changes. This process might include some discussion or even further changes to the code (this is the reason why branches are important).
After your contribution has been merged to the main project (or rejected) you can delete the branch you used for it.
To delete the branch in your local repository and on GitHub:
$ git branch -D BRANCH_NAME
$ git push origin --delete BRANCH_NAMEThis file is closely based on a blog post by Davide Coppola