How to: Git & Pull Requests - Atcold/NYU-DLSP20 GitHub Wiki

This is a mini step-by-step tutorial on how to contribute using Pull Requests for this project.

My username (LecJackS) will represents yours on the screenshots.

There is no single method, but I think this one is the easier and least prompt to errors.

1. Fork Repository

Go to Atcold github repository and fork it clicking the button as shown here:

fork repo

2. Clone this fork

Download this fork (not the main repo!) on your local computer using the terminal:

clone fork

On your terminal:

git clone https://github.com/your-username/pytorch-Deep-Learning.git

3. Edit files

Edit files on this local copy of the fork, keeping the same directories and filenames.

4. Upload changes to fork

Update your github fork with the modifications you've made to your local files:

On your terminal:

cd pytorch-Deep-Learning

git push

# You'll be asked to write github username and password

Your github fork now contains all the changes you've made in your local computer.

Note: You can use a Git GUI client for this matter if you don't like using the terminal that much.

5. Make Pull Request

Go to Atcold github repository again (not yours!) and click on Pull requests tab.

Once there, click on the New pull request green button:

make PR

6. Select your fork

Click on "compare across forks":

click compare across forks

Select your fork from the second dropdown menu:

select your fork

You should see a green check mark and "Able to merge" legend.

7. Compare changes

Verify that all changes showed in this page are only the ones you've made.

Now you can click "Create pull request"

8. Describe changes

Be descriptive with the changes made here, as specified on the wiki page Translation Guidelines

9. Remove fork after

After your content is reviewed and accepted, it will be merged to the main repository, and your pull request will be closed.

Here you've a couple of options, but the easier one is to remove this fork of yours, and later on, when you contribute again, you can repeat the steps above.

For that, you can click on Fork settings

remove fork 1

And here confirm the removal of this fork:

remove fork 2