Skip to content
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

Add instructions and flags for developing on local fork #194

Merged
merged 2 commits into from
Dec 4, 2023

Conversation

e-lo
Copy link
Contributor

@e-lo e-lo commented Dec 1, 2023

Fixes #193

@e-lo e-lo added the 📙 docs Elaborating or updating the documentation – inline or otherwise label Dec 1, 2023
@e-lo e-lo self-assigned this Dec 1, 2023
@e-lo e-lo requested a review from a team as a code owner December 1, 2023 00:24
Copy link
Contributor

github-actions bot commented Dec 1, 2023

@e-lo
Copy link
Contributor Author

e-lo commented Dec 1, 2023

This is where the change was - as rendered at the link above (to facilitate a quicker review):
image

@e-lo e-lo requested a review from jlstpaul December 1, 2023 18:13
Copy link
Contributor

@botanize botanize left a comment

Choose a reason for hiding this comment

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

I don't think the instructions for pushing your forked repo branch to the TIDES repo will work without first setting up the TIDES repo as a remote.

CONTRIBUTING.md Outdated
@@ -69,6 +73,16 @@ Use the following guidance in creating and responding to pull requests
- Complete the pull request template as best you can.
- In order to run all GitHub Actions automations, contributors with adequate permissions (i.e. Registered Contributors) should submit pull requests from a branch on the main repo, rather than from a fork.

!!! tip "If you worked from a local fork"

If you worked from a local fork instead of a feature branch of the main repository, you will not have the right permissions to run the continuous integration tests when you submit a pull request. To remedy, please push the branch of your local fork to a feature branch of the main repository:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd be a little more specific with language, since "main" is also used for the branch name. For example, If you worked from a fork of the repo instead of a feature branch of the TIDES repo,…

CONTRIBUTING.md Outdated
If you worked from a local fork instead of a feature branch of the main repository, you will not have the right permissions to run the continuous integration tests when you submit a pull request. To remedy, please push the branch of your local fork to a feature branch of the main repository:

```sh
git push origin <my-feature-branch-name>
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think these instructions will work from the fork, which would have origin defined as the forked repo, not TIDES-transit/TIDES. You'd have to add TIDES-transit/TIDES as a remote, and push to that remote, something like,

git remote add upstream git@github.com/TIDES-transit/TIDES.git
git push upstream <my-feature-branch-name>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah - good point, the remote origin would be your fork. But do you need to add upstream remote or is it automatically added when you fork the repo?

Copy link
Contributor

Choose a reason for hiding this comment

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

My understanding is that github tracks the relationship on github, but when you git clone your fork, you're setting up just the remote of your fork (as origin). If you want to push from your local clone of your fork to TIDES-transit/TIDES, you'd have to add the upstream yourself. You've forked the repo, you could test it out!

- Fixes git commands
- Uses more explicit language
- Adds what to do if you run into a permissions issue
@e-lo e-lo merged commit 4236beb into main Dec 4, 2023
2 checks passed
@e-lo e-lo deleted the 193-make-branch-model-more-obvious branch December 4, 2023 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📙 docs Elaborating or updating the documentation – inline or otherwise
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📝 Add direction to work from a branch of main repo rather than a fork
2 participants