Closed GoogleCodeExporter closed 9 years ago
The problem is, how do you want to get rid of the change?
Maybe you like this branch, and the change is only the
tip most revision. `git reset --hard` is your friend.
Maybe you hate the branch altogether, and want it to die.
`git checkout some_other_branch; git branch -D bad_branch`
is then your friend.
Maybe the commit is the "B" in a chain "A-B-C" and you
want to keep "A and "C". `git rebase -i HEAD~3` is then
your new best friend.
I guess Gerrit could be taught some of the basic rules
that a human would use to decide which of these is the
best command to use right now. But we don't quite have
all of the information we need, e.g. we don't know what
the name of your current branch is, so we can't create
the `git branch -D bad_branch` line for you.
Also, if we are going to teach Gerrit how to use Git on
your behalf, its starting to feel like we should instead
take away the command line and ask you to edit online,
say with Bespin or something.
So I'm really not sure how we can do this effectively,
which is why we don't.
Original comment by sop@google.com
on 13 Jul 2010 at 3:21
> Also, if we are going to teach Gerrit how to use Git on
> your behalf, its starting to feel like we should instead
> take away the command line and ask you to edit online,
> say with Bespin or something.
there's a world of difference between editing on-line, which almost nobody
wants, and making the version control tools usable to people who aren't experts
in git's many layers.
we already have (internally at least) documentation and FAQs. i'd consider a
link to an appropriate visible FAQ entry to be a fix for this bug. the problem
at the moment is that you're just left on your own.
> e.g. we don't know what the name of your current branch is
personally, i think that's a bug in its own right. also not knowing where on my
disk the repository was. when i have a lot of repositories and a lot of changes
in flight, it can be a pain to track down which one i need to go and make
changes in (be they abandonment, rebasing, editing, more testing, or whatever).
couldn't repo upload this information too.
> The problem is, how do you want to get rid of the change?
this seems like a case of "the perfect is the enemy of the good". most of us
don't know much git. being told _any_ solution would be better than nothing.
being shown multiple solutions would be better than nothing. being shown
multiple solutions with hints as to how to choose between them would be great.
having that information on a FAQ somewhere and just giving us a link would be
great.
i know i said "copy & pasteable", and that would still be the ideal case, but
even just showing the idiom would be a help.
i'd also point out that the people doing complicated stuff (like your A-B-C
example) probably won't even read the hints because they already know what
they're doing, and those of us reading the hints wouldn't dream of ever getting
into a situation that complicated.
Original comment by e...@google.com
on 13 Jul 2010 at 4:33
Original comment by sop@google.com
on 13 Jul 2010 at 5:16
I don't think that this is a reasonable request. This is similar to asking
Facebook to give you a one line command on how to delete the photo you posted
two years ago which you now want to delete from your local disk. There really
is no right sane way to do this. Git branch management is a personal thing and
there is no simple answer for non advanced users as you imply.
You said: "it seems like a real bizarre dance to get rid of the branch you're
on", so how is Gerrit supposed to know what dance you have been doing in your
repository to help you out?
Original comment by mf...@codeaurora.org
on 22 Feb 2012 at 5:38
Original issue reported on code.google.com by
e...@google.com
on 8 Jul 2010 at 5:33