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

fork: Rename 'origin' to 'upstream' after forking #553

Merged
merged 2 commits into from
Jul 25, 2016

Conversation

eungjun-yi
Copy link

Improve #552.

@hemanth hemanth merged commit 1ec4835 into tj:master Jul 25, 2016
@hemanth
Copy link
Collaborator

hemanth commented Jul 25, 2016

@nicolaiskogheim This time the trigger was bit slower ;)

git clone "https://github.com/$user/$project" "$project"
if [ "$origin" = true ]; then
git remote rename origin upstream
git remote add origin "https://github.com/$user/$project"
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need to do a git fetch --all here to update the references and make the new origin "visible" so to speak.

Copy link
Author

Choose a reason for hiding this comment

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

Isn't git fetch origin enough?

I have several remote refs and some of them are accessible only in my office. I'm afraid that git fetch --all causes some kind of network error in my home.

@nicolaiskogheim
Copy link
Collaborator

@hemanth Hehe, yes. But I didn't have time to review.

@npcode Much better. Please see comments in the code.
Also, the file man/git-fork.html dissapeared. It should have been generated by the man script. Any idea what happened?

@eungjun-yi
Copy link
Author

@nicolaiskogheim I ran make docs and the document was generated. I have no idea about why it disappeared in my branch. I've sent a new pr #554 to fix it and update this feature.

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

Successfully merging this pull request may close these issues.

3 participants