Skip to content

[Documentation:Developer] Account for changed name of fork #604

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

Merged
merged 3 commits into from
May 28, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions _docs/developer/getting_started/commit_to_PR_from_fork.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,49 +22,52 @@ The instructions below are for command line use of git.


1. First, from the PR on the Github website, find the name of the
fork + branch name. It should be formatted something like this:
user + branch name. It should be formatted something like this:
```
contributorusername:contributor_branch_name
```

Additionally, find the name of the fork
on the fork's page on Github.


2. Next, make a local branch on your computer in your working repository
with the proposed code changes. Here are the command lines
(substitute the fork & branch name we found above):
3. Next, make a local branch on your computer in your working repository
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you change this number to 3?
Did you mean to insert a step 2 above?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that; the file already had issues with the numbering which i passed through and fixed now

with the proposed code changes. Here are the command lines
(substitute the user, branch, and fork names we found above):

If you **are not** using ssh keys on git:
```
git checkout -b contributorusername-contributor_branch_name main
git pull https://github.com/contributorusername/Submitty.git contributor_branch_name
git pull https://github.com/contributorusername/fork_name.git contributor_branch_name
```

If you **are** using ssh keys on git:
```
git checkout -b contributorusername-contributor_branch_name main
git pull [email protected]:contributorusername/Submitty.git contributor_branch_name
git pull [email protected]:contributorusername/fork_name.git contributor_branch_name
```


3. This has made a local branch named
4. This has made a local branch named
`contributorusername-contributor_branch_name`. Go ahead and test
and review the PR and make code edits and new commits to your
local branch as needed.



4. In order to push the changes to the contributor's fork (and the PR
5. In order to push the changes to the contributor's fork (and the PR
on Github from the fork), you will specify the upstream to be the
contributor's fork:

If you **are not** using ssh keys on git:
```
git remote add upstream https://github.com/contributorusername/Submitty.git
git remote add upstream https://github.com/contributorusername/fork_name.git
```


If you **are** using ssh keys on git:
```
git remote add upstream [email protected]:contributorusername/Submitty.git
git remote add upstream [email protected]:contributorusername/fork_name.git
```


Expand All @@ -77,20 +80,20 @@ The instructions below are for command line use of git.
```
origin https://github.com/Submitty/Submitty.git (fetch)
origin https://github.com/Submitty/Submitty.git (push)
upstream https://github.com/contributorusername/Submitty.git (fetch)
upstream https://github.com/contributorusername/Submitty.git (push)
upstream https://github.com/contributorusername/fork_name.git (fetch)
upstream https://github.com/contributorusername/fork_name.git (push)
```

Or this if you **are** using ssh keys on git:
```
origin [email protected]:Submitty/Submitty.git (fetch)
origin [email protected]:Submitty/Submitty.git (push)
upstream [email protected]:contributorusername/Submitty.git (fetch)
upstream [email protected]:contributorusername/Submitty.git (push)
upstream [email protected]:contributorusername/fork_name.git (fetch)
upstream [email protected]:contributorusername/fork_name.git (push)
```


5. Now once you are finished with your code changes, first commit them to
6. Now once you are finished with your code changes, first commit them to
the local branch (named
`contributorusername-contributor_branch_name`).

Expand All @@ -103,7 +106,7 @@ The instructions below are for command line use of git.
*NOTE: If you encounter a permissions error, it is possible that the external
contributor didn't grant access for collaboration on the branch.*

6. Confirm that you can see the changes on the Github website for the PR.
7. Confirm that you can see the changes on the Github website for the PR.


---
Expand Down
Loading