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

Consider teaching people to fork #22

Open
danielballan opened this issue Jul 14, 2018 · 6 comments
Open

Consider teaching people to fork #22

danielballan opened this issue Jul 14, 2018 · 6 comments

Comments

@danielballan
Copy link
Contributor

No description provided.

@danielballan
Copy link
Contributor Author

This could take the form of a section on collaboration models:

  1. One person working alone (no forks)
  2. An informal collaboration (forks of a personal repo)
  3. An organization (forks on an upstream repo)

@danielballan
Copy link
Contributor Author

And borrow from the numpy docs, which are a surprisingly detailed tutorial on getting git set up: https://docs.scipy.org/doc/numpy/dev/development_environment.html#development-environment

@danielballan
Copy link
Contributor Author

For collaboration across multiple people:

  1. Fork the repository.
  2. Clone from your fork. git clone https://github.com/YOUR_USER_NAME/REPO_NAME
  3. Add the upstream remote git remote add https://github.com/ORGANIZATION_NAME/REPO_NAME.
  4. Check out a "feature branch". git checkout -b my-cool-feature
  5. Make changes. Remember to git add ... and git commit.
  6. Push changes to your fork. git push origin my-cool-feature.
  7. Go to GitHub and open a Pull Request.
  8. When your PR or others' are merged, bring your local copy of the master branch up to date. git pull upstream master.

@tacaswell
Copy link
Member

bike shedding the remote names a bit, githubs tools (hub) pushes you towards 'origin' being the canonical upstream and using user names for all other forks (including your own). I know I have taken a different position before, but have given up.

It also fits the work flow of "clone some repo to install/test it (so it is 'origin'), make some changes, realize you need to make your fork, add it as a remote" which is at least my normal flow through things.

@danielballan
Copy link
Contributor Author

Yeah, I recently switched conventions myself. I will switch conventions here. We must be careful to make the instructions self-consistent throughout.

@klauer
Copy link

klauer commented Sep 21, 2018

👍 on keeping the canonical upstream as 'origin'. I tend to follow the same workflow as @tacaswell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants