From: martin f krafft <madduck@madduck.net>
To: git discussion list <git@vger.kernel.org>
Subject: pushing changes to a remote branch
Date: Tue, 10 Jul 2007 16:36:14 +0200 [thread overview]
Message-ID: <20070710143614.GA29681@piper.oerlikon.madduck.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 1898 bytes --]
Hi list,
I am using git-remote to clone a remote repository and track only
a select number of branches:
git remote add -f -t vim -t ssh origin git://git.server.org/path/to/repo.git
git branch -r
origin/ssh
origin/vim
git merge ...
I now merge these into the local repo and decide that I need to make
a change to origin/vim. So I figure that it's probably easiest if
I just checkout the remote branch, make the change, commit it, push
it, return to the master branch, git-remote update and merge, but:
git checkout origin/vim
Note: moving to "origin/vim" which isn't a local branch
echo change > newfile; git add newfile
git commit -m'make change'
Created commit 64b8b2e: make change
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 newfile
If I now checkout master and then return to origin/vim, the commit
is gone.
If I repeat all this and, instead of returning to master, I push the
commit to origin, git suggests success (the push looks normal).
However, I then cannot find the commit anymore. It's not available
locally, nor in origin/vim, nor in the local master branch or in
origin/master.
This is curious and I'd love to find out what's going on.
Much more, however, I am interested how I am supposed to push
commits back to select remote branches.
Using
git push git://git.server.org/path/to/repo.git \
7fbb0655:refs/heads/vim
does push commit 7fbb0655 to the vim branch in the remote
repository, but I should be able to do this using origin/vim, no?
How?
--
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
spamtraps: madduck.bogus@madduck.net
"the worst part of being old is remembering when you was young."
-- alvin straight (the straight story)
[-- Attachment #2: Digital signature (GPG/PGP) --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next reply other threads:[~2007-07-10 14:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 14:36 martin f krafft [this message]
2007-07-10 17:34 ` pushing changes to a remote branch Jeff King
2007-07-10 18:10 ` Brian Gernhardt
2007-07-10 22:04 ` Jeff King
2007-07-11 3:44 ` Sean Kelley
2007-07-11 19:34 ` Jan Hudec
2007-07-11 19:31 ` Jan Hudec
2007-07-11 21:26 ` Junio C Hamano
2007-07-14 8:38 ` Jan Hudec
2007-07-11 19:29 ` Jan Hudec
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=20070710143614.GA29681@piper.oerlikon.madduck.net \
--to=madduck@madduck.net \
--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).