From: Maaartin <grajcar1@seznam.cz>
To: git@vger.kernel.org
Subject: Tracking branches and pulling on remote
Date: Wed, 5 Jan 2011 00:58:47 +0000 (UTC) [thread overview]
Message-ID: <loom.20110105T013525-413@post.gmane.org> (raw)
1.
I'm using git for couple of months and still don't get it. In a new repo a have
two branches: master and X. I pushed both to the server, everything seems to
work. However, there's origin/master but no origin/X in my repo. When I execute
git fetch --all -v
only master gets fetched. I've created an entry in the .git/config, no change.
I've tried things like
git branch --track X origin/X
and all of them ends with an error message. Finally I've found out that
git config --add remote.origin.fetch refs/heads/X:refs/remotes/origin/X
seems to do it, was it right?
2.
I'd like to do some (at least for now) private changes on a foreign project. The
ideal way I think about would be the following:
- my local repo is linked to my own server (for backup purposes and for private
cooperation with a college)
- the repo on my server is linked to the github hosting the project
Now, I'd need to do something like
ssh myserver git fetch
and everything would be fine. I can do it this way, but I'd prefer something like
git remote fetch
or even
git fetch --remote-too
which would first make my server fetch from its origin and then my local repo
fetch from my server. Is there such a thing? Would you recommend me doing it in
a different way?
next reply other threads:[~2011-01-05 0:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-05 0:58 Maaartin [this message]
2011-01-05 5:01 ` Tracking branches and pulling on remote Jeff King
2011-01-05 16:40 ` Maaartin-1
2011-01-05 16:44 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20110105T013525-413@post.gmane.org \
--to=grajcar1@seznam.cz \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).