I guess I'm alone in finding git not that hard to use. My only issue is git isn't pretty and to that end I have a few scripts to give me prettier logs (like most people have) and prettier branch summaries (my macro displays all branches, their latest commit id and dates).
Beyond that I manipulate my tree with straight up git commands.
Any halfway competent developer should be able to master git in a couple of weeks let alone be able to write their own version of git given a couple of full time weeks to work in.
Git is a very powerful set of tools. It is fast and flexible.
Its UI is arcane and difficult to use compared to other SCMs. This includes both the native gitk and git gui tools, and even the Windows shell extension tools like Tortoise.
I didn't even know that git gui existed till the other day when a colleague showed it to me. I'd already been using it for over two months and read an entire book on git. I told the colleague about interactive add and he'd never heard about it. He has been using git for over two years. Individual user experiences vary widely due to its adherence to the unix philosophy of many small, independent tools. So it's not easy to understand all that's available and there are many ways to do the same task.
It is not difficult to fuck up a repo doing complex merges with rebase. It is not difficult to miss changes in a commit between the file system and the index. It is not difficult to inadvertently commit unwanted changes.
You need discipline to use git properly on any real-world project, you need to pay close attention to what you are doing, and you need to understand how the system works at a fairly low level.
There is nothing wrong with any one of these things but honestly they are not attributes I particularly want in an SCM. There is a lot I like about git but you can easily shoot yourself in the foot with it if you don't know what you're doing. This alone makes it a bad fit for many projects/teams, honestly.
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.
44
u/[deleted] Jun 19 '14
I guess I'm alone in finding git not that hard to use. My only issue is git isn't pretty and to that end I have a few scripts to give me prettier logs (like most people have) and prettier branch summaries (my macro displays all branches, their latest commit id and dates).
Beyond that I manipulate my tree with straight up git commands.
Any halfway competent developer should be able to master git in a couple of weeks let alone be able to write their own version of git given a couple of full time weeks to work in.