git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 'git branch' when origin branch with same name exists
@ 2012-06-19 14:51 Ryan Lortie
  2012-06-19 15:18 ` jaseem abid
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Ryan Lortie @ 2012-06-19 14:51 UTC (permalink / raw)
  To: git

hi,

After helping someone on IRC who got themselves into a bit of a problem, 
I have a feature request for git.

In this case, the user wanted to checkout a branch of a module.  They did:

   git clone git://git.gnome.org/gtk+
   cd gtk+
   git branch gtk-3-4

Obviously this is a user error, but it's a pretty innocent one, and puts 
the user in a bad state.  When they figure they should have typed "git 
checkout gtk-3-4" it is already too late -- they will be taken onto 
their locally-created copy of the master branch.

So feature request: 'git branch' should not allow creating a local 
branch that has the same name as a branch that already exists on 
'origin' (or any remote?) without some sort of --force flag.  It could 
instead helpfully say:

   """

     The branch you are trying to create already exists on the origin.
     Are you sure you don't want to checkout this branch using
     'git checkout gtk-3-4'

  """

or something like that.

Thoughts?

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-06-20 18:08 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-19 14:51 'git branch' when origin branch with same name exists Ryan Lortie
2012-06-19 15:18 ` jaseem abid
2012-06-19 15:35 ` Michael Schubert
2012-06-19 15:54   ` Ryan Lortie
2012-06-19 16:17     ` Philippe Vaucher
2012-06-19 15:57   ` Angus Hammond
2012-06-19 16:06 ` Konstantin Khomoutov
2012-06-19 17:06   ` Ryan Lortie
2012-06-20  8:31     ` Andreas Ericsson
2012-06-19 17:21 ` Thomas Rast
2012-06-19 18:31   ` Junio C Hamano
2012-06-19 20:44     ` Ryan Lortie
2012-06-19 21:32       ` Junio C Hamano
2012-06-19 21:50         ` Ryan Lortie
2012-06-19 23:21       ` Phil Hord
2012-06-20 17:32         ` Junio C Hamano
2012-06-20 17:51           ` Matthieu Moy
2012-06-20 18:07             ` Junio C Hamano
2012-06-19 18:22 ` Junio C Hamano

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).