Home > Source Control > Forking Github Repos on Win32

Forking Github Repos on Win32

I’ll be upfront: I’m a Mercurial guy. But sometimes I have no choice but to use git. That’s often a painful proposition on Win32, especially when using github. Github’s advice on forking a repository flat out does not work for me, so I follow this slightly modified process instead.

Perhaps I just have an outdated msysgit installation, perhaps it’s just a limitation of running git on win32, or perhaps my gitfu is just not l33t enough. Who knows. After many fails, though, this sequence of git bash commands is the only thing that works for me:

git clone https://github.com/<your_username>/<child_repo_name>.git
cd <child_repo_name>
git remote add upstream https://github.com/<parent_repo_owner_username>/<parent_repo_name>.git
git fetch upstream
git merge upstream/master
git push origin master

Using the git protocol over ssh seems to be a no-go, so I’m using HTTPS instead. Hopefully this solution works for you too.

If you’re on msysgit, and are having trouble working with github, I feel you. If not, or if you have a better solution, please post a comment and share.

Happy forking!

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: