-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to make a successful PR?🤔 #300
Comments
Hi @TildaDares , I created an issue to help beginners to make a PR. Can you suggest changes if any needed? |
Hi @Somya-Singhal, this looks really great. I think you missed the step of setting a remote for the fork. This article explains more https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github |
This is great @Somya-Singhal |
Thanks @TildaDares @on2onyekachi for encouraging me. I have updated the issue @TildaDares. Can you please review it and suggest further changes if it's needed? |
Amazing work @Somya-Singhal!! You can share this in the chatroom so that other applicants know about it. Thanks! |
Thanks @TildaDares for giving me an opportunity to help others, I will share this in the chatroom. |
Hi @Somya-Singhal i love this! Perhaps you'd like to add a link to this from the README? That itself could be a first-timers-only issue if you'd like to create it? |
Ya sure @jywarren, I will create an FTO issue and update you! |
@Somya-Singhal , I am facing this issue in step 3, can you please help me. |
Sorry for the delayed response, you have to first do |
Ok thank you I'll look into it.:) |
@Somya-Singhal still facing some issues :( |
type |
Thank you for your help, but it's still showing the same error. :'( |
1 similar comment
Thank you for your help, but it's still showing the same error. :'( |
Hi @rajvidg , you can use command in your terminal |
@Somya-Singhal still facing some issues :( okay thank you! |
So should I use this path or what? Can you please help? :(@Somya-Singhal still facing some issues :( |
Hi @rajvidg , as @Somya-Singhal mentioned above. Write just Write |
Oh, okay thank you!! :) |
To help beginners who have started their journey to open source, I am writing few steps to create a successful PR.
Click on the fork icon present at the top right corner of the repository.
Here is the link of the repository (https://github.com/publiclab/infragram)
This step will create a copy of the main repository so that you can modify it.
For this first copy the URL by clicking as shown in the below demo image.
Then after creating a folder in your desktop, open bash shell and type the command(but remember to replace "url" in the
below command with the url that you have copied above)
git clone <url>
This step creates a copy of the repository in your own computer.
Now you have to create a new branch(as the whole code workflow is in main branch so whenever any issue needs to be
solved it is necessary that we make changes on a separate branch so that it does not disturbs the whole workflow and
later it can be reviewed and merged)
Command for creating a new branch(remember to replace "name-of-the-branch" with the name you like to give for the
branch)
git checkout -b <name-of-the-branch>
Open the file where you want to make changes and make all necessary changes that's required to fix the issue you are
working on and save it.
(Optional step)-> You can do
git status
to check the files you have modified.(Optional step)-> You can also do
git diff
to see the lines which you have deleted or modified.Now to add the files you have modified, do
git add <name-of-the-modified-file>
(Remember to replace "name-of-the-modified-file" with the name of the file(s) you have modified).
Now to commit the changes, do
git commit -m "<write-a-message-here>"
(Remember to replace "write-a-message-here" with the message fitting according to the issue you are fixing)
Now do,
git push --set-upstream origin <name-of-the-branch>
(Remember to replace "name-of-the-branch" with thename that you have given to the branch in step-3)
Now we have to configure a remote for the fork, then sync the fork(this step is done to keep your local copy of the
codebase up to date)
To configure a remote for the fork, write the following commands:
git remote -v
git remote add upstream https://github.com/original-owner-username/original-repository.git
[For this project this command will be:
git remote add upstream https://github.com/publiclab/infragram.git
]git remote -v
To sync the fork, write the following command:
git fetch upstream
Now we have to switch to local main branch of the repository, for this, write command:
git checkout main
To merge any changes that were made in the original repository’s main branch with our local main branch, write command
git merge upstream/main
Now you can go to your github and see there git will automatically show "your recent pushed branches", there click on "Compare & pull request" and you can add the message you want so that it will give insight about issue that you had fixed and finally click on create a pull request.
Done!!✌
The text was updated successfully, but these errors were encountered: