login
Header Space

 
 

Re: git push (mis ?)behavior

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Git Mailing List <git@...>
Cc: Johannes Schindelin <Johannes.Schindelin@...>, Pierre Habouzit <madcoder@...>, Wincent Colaiuta <win@...>, Miles Bader <miles@...>, Junio C Hamano <gitster@...>, Karl Hasselström <kha@...>
Date: Thursday, October 4, 2007 - 10:47 am

On Oct 3, 2007, at 7:02 PM, Karl Hasselström wrote:


Here is an interesting related pitfall where my expectations about
the behaviour of git push in relation with tracking branches were
wrong. I should have know better, but I somehow forgot the details.
I expected that the following would establish a two-way link, not
only a one way link:

    git checkout --track -b mynext origin/next

sets up a tracking branch and "git pull" fetches and merges changes
from origin/next as expected.

I somehow expected that "git push" would push changes from mynext to
origin/next. But it doesn't. It would only do so if I had chosen
the same name for the local branch, that is

    git checkout --track -b next origin/next

would have set up a two-way link -- but maybe only as long as I don't
have other push lines in my config file. I'm not sure about the last
point.

I do not find it very intuitive to mangle the push behaviour into the
naming of the local branch. I think it would be a good idea if the
two commands above would either both setup a pull/push relation
or both would setup a pull-only relation. If pull-only would be the
default another switch could be provided to establish a pull/push
relation, like

    git checkout --track --push -b mynext origin/next

Comments?

	Steffen-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git push (mis ?)behavior, Pierre Habouzit, (Thu Sep 27, 9:04 am)
Re: git push (mis ?)behavior, Junio C Hamano, (Thu Sep 27, 3:22 pm)
Re: git push (mis ?)behavior, Miles Bader, (Wed Oct 3, 1:10 am)
Re: git push (mis ?)behavior, Pierre Habouzit, (Wed Oct 3, 3:35 am)
Re: git push (mis ?)behavior, Miles Bader, (Wed Oct 3, 4:57 am)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Wed Oct 3, 6:25 am)
Re: git push (mis ?)behavior, Benoit SIGOURE, (Wed Oct 3, 7:10 am)
Re: git push (mis ?)behavior, Karl , (Wed Oct 3, 6:49 am)
Re: git push (mis ?)behavior, Johannes Schindelin, (Wed Oct 3, 11:27 am)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Wed Oct 3, 12:26 pm)
Re: git push (mis ?)behavior, Karl , (Wed Oct 3, 12:07 pm)
Re: git push (mis ?)behavior, Johannes Schindelin, (Wed Oct 3, 12:18 pm)
Re: git push (mis ?)behavior, Pierre Habouzit, (Wed Oct 3, 12:28 pm)
Re: git push (mis ?)behavior, Johannes Schindelin, (Wed Oct 3, 12:44 pm)
Re: git push (mis ?)behavior, Karl , (Wed Oct 3, 1:02 pm)
Re: git push (mis ?)behavior, Steffen Prohaska, (Thu Oct 4, 10:47 am)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Thu Oct 4, 11:54 am)
Re: git push (mis ?)behavior, Steffen Prohaska, (Thu Oct 4, 12:24 pm)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Thu Oct 4, 1:49 pm)
Re: git push (mis ?)behavior, Junio C Hamano, (Wed Oct 3, 7:08 am)
Re: git push (mis ?)behavior, Karl , (Wed Oct 3, 9:14 am)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Wed Oct 3, 7:22 am)
Re: git push (mis ?)behavior, Pierre Habouzit, (Wed Oct 3, 5:03 am)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Wed Oct 3, 2:47 am)
Re: git push (mis ?)behavior, Miles Bader, (Wed Oct 3, 4:32 am)
Re: git push (mis ?)behavior, Junio C Hamano, (Wed Oct 3, 1:39 am)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Fri Sep 28, 8:38 am)
Re: git push (mis ?)behavior, Steffen Prohaska, (Fri Sep 28, 2:52 am)
Re: git push (mis ?)behavior, Junio C Hamano, (Fri Sep 28, 3:07 am)
Re: git push (mis ?)behavior, Jan Hudec, (Tue Oct 9, 1:05 am)
Re: git push (mis ?)behavior, Steffen Prohaska, (Tue Oct 9, 3:23 am)
Re: git push (mis ?)behavior, Steffen Prohaska, (Fri Sep 28, 5:11 am)
Re: git push (mis ?)behavior, Johannes Schindelin, (Fri Sep 28, 9:31 am)
Re: git push (mis ?)behavior, Pierre Habouzit, (Fri Sep 28, 2:58 am)
Re: git push (mis ?)behavior, Steffen Prohaska, (Fri Sep 28, 5:26 am)
Re: git push (mis ?)behavior, Junio C Hamano, (Fri Sep 28, 5:44 am)
Re: git push (mis ?)behavior, Steffen Prohaska, (Fri Sep 28, 6:04 am)
Re: git push (mis ?)behavior, Pierre Habouzit, (Thu Sep 27, 3:36 pm)
Re: git push (mis ?)behavior, Wincent Colaiuta, (Thu Sep 27, 9:30 am)
Re: git push (mis ?)behavior, Benoit SIGOURE, (Thu Sep 27, 11:28 am)
speck-geostationary