Honestly if your commits are missing files you need to go back to git basics...
I don't get what a "complex" merge ... Do you mean one with conflicts? Because conflicts happen in all SCMs. Merging in git is dead simple
git merge [--no-ff] source_branch
I don't understand how that could be simpler. Heck if you do --no-ff merges you can undo the merge with git reset HEAD1 --hard and you're back to the state before the merge. Or you could do your merges into a new branch of your target and just throw away the new branch if it goes wrong.
You find it hard to use because you're not thinking like you're using git. You can always create a scratch branch to practice merges/rebase/etc into. None of those commands delete commit objects.
Heck I can do
git checkout -b new
git rm -f *
git commit -am "fuck the world!"
Heck if you do --no-ff merges you can undo the merge with git reset HEAD^1 --hard and you're back to the state before the merge.
And why it can't it be just as easy when you don't do --no-ff?
If I am working somewhere where we do --no-ff exclusively and I was new so forgot to alias it require a bit of work and looking at several man pages to undo?
--no-ff should be the default for all non-trivial merges (e.g. >1 commit) because it allows you to revert the merge easily.
And this is an example of a fix that git could use to be more usable.
It is my understanding that most people want a GUI with changes like the OP is mentioning and a CLI with a few subtle ease of use changes like --no-ff being default and more sane force options. For instance git push -f being --force-with-lease instead of --force.
This whole thread is a series of somebody pointing out a problem in Gits interface or how to make Git more usable, and then you responding with "git is not completely unusable!!!", including your very first comment.
It's reminiscent of the threads about PHP a couple of years ago. Somebody would point out an obvious flaw in PHP, like inconsistent naming, and then another person would respond "this is just a small problem!!!" over and over for zillions of flaws.
At some point you just have to accept that yes, Gits interface is pretty damn ugly. It doesn't mean Git is useless, but it could be a whole lot better than it is now.
0
u/[deleted] Jun 19 '14
run ... git .... status.
Honestly if your commits are missing files you need to go back to git basics...
I don't get what a "complex" merge ... Do you mean one with conflicts? Because conflicts happen in all SCMs. Merging in git is dead simple
I don't understand how that could be simpler. Heck if you do --no-ff merges you can undo the merge with git reset HEAD1 --hard and you're back to the state before the merge. Or you could do your merges into a new branch of your target and just throw away the new branch if it goes wrong.
You find it hard to use because you're not thinking like you're using git. You can always create a scratch branch to practice merges/rebase/etc into. None of those commands delete commit objects.
Heck I can do
And from there either do
or
and I'm back to where I started