Stoppt die Vorratsdatenspeicherung! Jetzt klicken & handeln!
niemueller.de::home niemueller.de
Open Software. Open Knowledge.




 

Tim's WebLog - Post a comment


Setup git tracking branch for existing branch

Something that I did many web searches is how to setup up tracking of a remote git branch for an existing local branch. That regularly happens for example if I start with a local topic branch, and then push it to the central repository. Now, git does neither automatically setup that this (new) remote branch should be tracked for the local branch nor did I find a convenient command or argument to do so. So here is what is required, assuming that the remote repository is named origin, the local branch is topicbr, and the remote branch is timn/topicbr, and you are in the local git repository:

git config branch.topicbr.remote origin
git config branch.topicbr.merge refs/heads/timn/topicbr
.
It's that easy and now I have a place to look it up next time I need it...

Write down your comment and post it. Please don't be offensive and do not publish any information not directly related to the blog post you can read above!

Special tags: [exturl=http://www.niemueller.de]Tim's Website[/exturl] will create a link to an external page, [url=/software/]software[/url] will create a link to a a sub page of this website. Please use them. HTML is not allowed. The message will no be accepted.

Please post in English or German language, English is preferred.

Below you will see an image with weird looking text which does not seem to make sense. You are right, it makes no sense. But you have to type this text into the box below the image to be able to post. This has been done to fight the spam that appeared in comments in this blog.

NOTE: Your IP is logged when posting. This is needed since some "funny" guys already posted junk.


Your name:
Your email (optional, not shown):
Your website (optional):
Subject (optional):
Comment:
Anti-Spam:
Type text from image. This is needed to prevent spam to appear in blog comments (unfortunately).




Top 5 Pages
Wiki
WebLog
SquidGuard Webmin Module
IPtables Webmin Module
Network Utilities Webmin Module


Palm Software
UniMatrix UniMensa UniSorter
UniChat OHS Mobile Onager


My Bookshelf




Valid XHTML 1.1!

RSS Copyright © 2000-2009 by Tim Niemueller