This manual is based on the following workflow.
- Forking the team's branch to your own repository.
- Getting the latest files from the team's repository.
- Pushing the changes on your own repository.
- Creating a pull request from your repository to the teams'.
Preparing your working copy
- Create a fork of the repository on github. It would look something like
YOUR_USER_NAME/ORIGINAL_REPOSITORY_NAME
. - Create a repository and a working copy on your local drive by
git clone YOUR_FORK_URL
. - Add the repository you forked from as remote by
git remote add NAME_YOU_CHOOSE_FOR_REMOTE_REPOSITORY ORIGINAL_REPOSITORY_URL
.
Creating a Pull Request
- Get the most recent information on the original repository by
git pull NAME_YOU_CHOOSE_FOR_REMOTE_REPOSITORY NAME_OF_BRANCH_YOU_WANT_TO_BRANCH_FROM
- Create a branch you want to work on by
git checkout -b NAME_FOR_BRANCH NAME_YOU_CHOOSE_FOR_REMOTE_REPOSITORY/NAME_OF_BRANCH_YOU_WANT_TO_BRANCH_FROM
- Change whatever you want to in your local drive.
- Add a new change you want to track in the new commit by
git add FILE(s)_YOU_CHANGED
- Create a new commit by
git commit
- Push the branch to the fork you created by
git push origin NAME_FOR_BRANCH
. Keep in mind thatorigin
is the name given to the repository you cloned from. It should beYOUR_USER_NAME/ORIGINAL_REPOSITORY_NAME
if you followed this manual. - Create a pull request on Github.