Live data from Hacker News

Things I hate about Git (2012)

stevebennett.me

51–60 of 83 posts

Re: Things I hate about Git (2012)

#51

A thought: if you think you can make git better, why not just write a DSL (domain specific language) on top of it? I mean, it already does everything under the sun, so there's a challenge for anyone up for it!

Even better - write a chat bot for git hahaha :D make it so it can help you get out of tricky situations and not have search stackoverflow all the time

Re: Things I hate about Git (2012)

#52
I started using git as a hobbyst with the help of smartgit. It somehow made me realize what is git all about the 200x better than any tutorial. I use command line too, but things like diffing, adding files etc. it just makes life easier. Seriously you're a masochist if you don t use it. It'd free for personal use!

Re: Things I hate about Git (2012)

#54

Once you get the essence of git (objects, graph, commits as snapshots etc) everything becomes really easy. You don't need to memorize all command just need to understand some basic concepts. And some points about the article. Git is a framework actually, you need some workflow to use it in a team. So git requires a lot of discipline from all team members. You can't just "commit" as in subversion, you must understand…

git-flow[1] is implementation of a flow with better UX. You can fork it and modify to fit your needs.

[1] https://github.com/petervanderdoes/gitflow-avh

Re: Things I hate about Git (2012)

#55
post #8

I'm not anywhere near an expert with git, but I'm proficient enough to use it effectively with my normal workflow. I like git, but admittedly the bar was set really low by subversion. This article raises some valid points, though. One that resonates most with me is that git exposes its entire model. I really wish there was a git-lite that just had the few basic commands that junior developers can grok and not fuck up…

If you want a straight-forward mental model that works with git, try Gitless. Note, you will end up learning some new commands that simplify things, and you'll have to re-learn git if you work for someone that wants you to use the nitty-gritty, but every convenience has it's downside, and you just have to weigh that against the immediate benefits.

Edit: Thanks to lyall for the links. He posted below. [1]: http://gitless.com/ [2]: https://people.csail.mit.edu/sperezde/oopsla16.pdf

Re: Things I hate about Git (2012)

#56

Once you get the essence of git (objects, graph, commits as snapshots etc) everything becomes really easy. You don't need to memorize all command just need to understand some basic concepts. And some points about the article. Git is a framework actually, you need some workflow to use it in a team. So git requires a lot of discipline from all team members. You can't just "commit" as in subversion, you must understand…

> You can't just "commit" as in subversion, you must understand what are you doing.

Further I'd argue the subversion "just commit" model is potentially toxic to the quality of the codebase and SCM logs. It makes the act of sharing code with others overly casual. Users therefore often don't become proficient in the proper use of SCMs in general. They write poor commit messages, or may not have a clear understanding of changes introduced by their commit (this goes double for IDE-integrated SCM plugins that I've generally found to have poor UI and lack good affordances for grokking what's happening at any point).

The stage -> commit -> push (often to feature branch) provides multiple checkpoints to find issues in your code before it makes it into master/trunk. While staging (especially if you're using a GUI) you have a chance to view the changes being staged. After committing and before pushing, if you find something else that you missed, you can quickly amend your commit without much harm done. The pull request mechanism added by Github provides an additional code review step for a final sanity check and also allows you to run tests on branches before allowing merges (contrasted with the common practice of allowing everyone trunk privileges in SVN, often with a post-commit code review). Rebasing is a an act of final resort for cleaning up your work before everyone else is burdened with the job of grokking and maintaining it for the remaining lifetime of the system.

EDIT: Some of these practices are possible to replicate in SVN (eg. do an svn diff and really review the changes before committing) but there's no chance of amending commits, private or features branches are less frequently adopted and rebasing is equivalent to FTL travel and immortality from an SVN viewpoint.

Re: Things I hate about Git (2012)

#57
The thing that gets me every time is the git sub-commands which have multiple orthogonal uses, without so much as a command line flag to differentiate them.

    git reset abc  # unstage file `abc`
    git reset xyz  # switch to commit `xyz`
or:

    git checkout mybranch  # switch to branch `mybranch`
    git checkout myfile    # remove any local changes to `myfile` since the last commit
---

Maybe this would work great in a typed language where I might have `reset(File x)` and `reset(Commit x)` with different signatures... but for a CLI where everything is stringly-typed? Not so fun.

Also, god knows what happens here if there's a branch name with the same name as a file...

Re: Things I hate about Git (2012)

#58
post #11

All fair points. So what can we actually do about it?

Use something better? Like Fossil? I find Fossil way, way more friendly and useful for individual users and teams. http://fossil-scm.org/

Never heard of it before. Thanks! How's the learning curve?

Re: Things I hate about Git (2012)

#59
I'm working with a small team that uses CVS and I'm I'm in charge of recommending more modern version control software. I've been learning git since it seems to be the new standard, but after reading this, I don't think we have the time it will take to learn it. Is there another open source vcs that would be a more natural upgrade to CVS?

Re: Things I hate about Git (2012)

#60
post #26

Earlier quoted context omitted.

Honestly, use mercurial.

Maybe if GitHub/GitLab allowed me, I'd do so. Even SVN, honestly.

It is not hard to use Github with mercurial. I don't have personal experience with gitlab though.

Why would you prefer SVN over git? I find git to be infinitely better than SVN. DVCS is a pretty good paradigm and the biggest (valid) complaint I have seen about git is that several of the commands such `git checkout` have multiple meanings which isn't a big enough deal to lose DVCS.

Post reply on HN