DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Getting Git Pull To Work For New Repos In GitHub

  • submit to reddit
        When creating a new repos in GitHub, I sometimes what to have 2 master branches on different machines to work on, and to use the version on GitHub as my root. In order to keep my 2 branches in sync I would run 'git pull', but out of the box on gitHub this spews out a message asking for more information. Adding the lines below should make it work again as expected.

git config branch.master.remote origin
git config branch.master.merge refs/heads/master 


Chris O'Sullivan replied on Sat, 2007/04/21 - 11:14am

Worked a charm. Thanks!