LoginSignup
0
0

More than 5 years have passed since last update.

Creating a pull request using Github

Last updated at Posted at 2016-12-29

This manual is based on the following workflow.

  1. Forking the team's branch to your own repository.
  2. Getting the latest files from the team's repository.
  3. Pushing the changes on your own repository.
  4. Creating a pull request from your repository to the teams'.

Preparing your working copy

  1. Create a fork of the repository on github. It would look something like YOUR_USER_NAME/ORIGINAL_REPOSITORY_NAME.
  2. Create a repository and a working copy on your local drive by git clone YOUR_FORK_URL.
  3. 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

  1. 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
  2. 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
  3. Change whatever you want to in your local drive.
  4. Add a new change you want to track in the new commit by git add FILE(s)_YOU_CHANGED
  5. Create a new commit by git commit
  6. Push the branch to the fork you created by git push origin NAME_FOR_BRANCH. Keep in mind that origin is the name given to the repository you cloned from. It should be YOUR_USER_NAME/ORIGINAL_REPOSITORY_NAME if you followed this manual.
  7. Create a pull request on Github.
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0