Re: 'git branch' when origin branch with same name exists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 19, 2012 at 8:21 PM, Ryan Lortie <desrt@xxxxxxxx> wrote:
> 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?

Dont know much about this but to me it looks like a good feature.

-- 
Jaseem Abid
http://jaseemabid.github.com
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]