Skip to content

Instantly share code, notes, and snippets.

@yusufhm
Created April 11, 2016 01:12
Show Gist options
  • Select an option

  • Save yusufhm/f06320efc40711dd2c3638b22aed88cb to your computer and use it in GitHub Desktop.

Select an option

Save yusufhm/f06320efc40711dd2c3638b22aed88cb to your computer and use it in GitHub Desktop.
Fork different push & pull remote URLs

Using different push & pull URLs for a forked git project

Start with source repo url

git remote -v

should give something like

origin  git@github.com:<user>/<project>.git (fetch)
origin  git@github.com:<user>/<project>.git (push)

Set the push URL to the forked remote:

git remote set-url --push origin git@github.com:<new-user>/<project>.git

Updated remotes

git remote -v

should show something like

origin  git@github.com:<user>/<project>.git (fetch)
origin  git@github.com:<new-user>/<project>.git (push)

Reference: http://sleepycoders.blogspot.com.au/2012/05/different-git-push-pullfetch-urls.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment