Skip to content

Latest commit

 

History

History
150 lines (76 loc) · 7.34 KB

FirstPullRequest.md

File metadata and controls

150 lines (76 loc) · 7.34 KB

SETTING UP DEV COLLECTIVE AND FIRST PULL REQUEST


FORKING AND CLONING REPO


1. Go to DEV COLLECTIVE MASTER REPO repo at: https://github.com/Mintbean/DevCollective.io

alt text

2. FORK the repo to your own GitHub account

alt text

3. Now inside your personal forked repo, copy the CLONE URL

alt text

4. CREATE A FOLDER on your computer (wherever you want the project to live locally)

alt text

5. Open the folder in VS CODE (or your preferred code editor)

alt text

6. In the terminal RUN:

git clone theCloneURLyouGrabbedinStep3

alt text

7. Then RUN:

cd DevCollective.io

alt text

8. You can now make the changes you wish to make

FIRST PULL REQUEST


1. Once you are ready to start a pull request for review you can RUN:

git checkout -b exampleCategory/exampleName

alt text

2. You have just created a branch. What you call this CATEGORY/NAME is just for the sake of organization and can be anything
3. You can now RUN:

git add .

alt text

4. Then you can name your commit. RUN:

git commit -m "example name of commit"

alt text

5. After this you are ready to push the changes to the branch you just created. RUN:

git push -u origin exampleCategory/exampleName

alt text

6. Your branch now has one commit in it. You can now log on to your FORKED GIT REPO
7. To start your first pull request, click on the button PULL REQUESTS

alt text

8. Click on create COMPARE & PULL REQUEST

alt text

9. Make sure the DEV COLLECTIVE MASTER is on the left

alt text

10. On the right side set compare to the BRANCH YOU JUST CREATED

alt text

11. Write a comment to go with your Pull Request (Probably something explaining the request purpose) and then click CREATE PULL REQUEST

alt text

12. CONGRATS ON CREATING YOUR FIRST PULL REQUEST! The request will either be accepted and merged with the Master Branch or you will receive a review in response to your pull request

alt text


WHAT TO DO IF YOU GET A REVIEW WITH A COMMENT


1. You may get a RESPONSE to your pull request. This is usually a change or clarification of what you want to push to the master branch

alt text

2. Open the VIEW CHANGES to read what was sent to you

alt text

3. You now have a few options. First, you can simply respond to the comment and COMMENT BACK

alt text

4. You can also go back a page and CLOSE WITH COMMENT to close the pull request out and leave a comment in doing so as to the reason for the close

alt text

5. You can also CLOSE PULL REQUEST without commenting back

alt text

6. Or you can make more changes to your file and ADD TO PULL REQUEST. You can do this by following the next few steps:
7. Make more changes to the local repo
8. Then you can RUN:

git add .

9. Next you can RUN:

git commit -m "a new name for this new commit"

10. Then you can RUN:

git push -u origin exampleCategory/exampleName

(this should be the same branch name that you have created at the beginning of this)
11. So you have basically just ADDED ANOTHER COMMIT to the branch you created at the start of all of this.
  • You can do this as many times as necessary until the changes have been approved and the branch you created with all the commits attached gets merged into the Master Branch or the Pull Request is closed.
  • Every time you make a new Pull Request and a created branch to it, all the commits pushed to that branch are part of the same Pull Request.
12. CONGRATS ON YOUR FIRST MERGE AND CONTRIBUTION TO AN OPEN SOURCE PROJECT!!!