The Wayback Machine - https://web.archive.org/web/20200916153009/https://github.com/atom/open-on-github/pull/61
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

Make remote and branch configurable by git config #61

Merged
merged 2 commits into from Jan 27, 2016

Conversation

@hokaccha
Copy link
Contributor

hokaccha commented Jan 26, 2016

My forking a repository workflow is as below.

$ git clone --origin upstream git@github.com:atom/atom.git .
$ hub fork # set the remote name to $MYNAME
$ git remote rename $MYNAME origin
$ git remote -v
origin  git@github.com:$MYNAME/atom.git (fetch)
origin  git@github.com:$MYNAME/atom.git (push)
upstream        git@github.com:atom/atom.git (fetch)
upstream        git@github.com:atom/atom.git (push)
$ git checkout -b my-awesome-feature

In this case, open-on-github opens my fork page, but I always expect to open original project's page(upstream/master). I use the git config in order to solve this problem.

$ git config atom.open-on-github.remote upstream

This patch will also fix #48

@lee-dohm
Copy link
Member

lee-dohm commented Jan 27, 2016

Would you mind adding some documentation to the README for this feature too?

@hokaccha
Copy link
Contributor Author

hokaccha commented Jan 27, 2016

@lee-dohm I added some documentation.

@lee-dohm
Copy link
Member

lee-dohm commented Jan 27, 2016

Thanks for this!

lee-dohm added a commit that referenced this pull request Jan 27, 2016
Make remote and branch configurable by git config
@lee-dohm lee-dohm merged commit 44d4dac into atom:master Jan 27, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@hokaccha hokaccha deleted the hokaccha:force-config branch Jan 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.