Hacker News new | ask | show | jobs
by reagent_finder 2359 days ago
What?

To use git you need to know clone, pull, commit, push. For larger projects branch and merge. Those fall into a lot of boxes that say "easy" or "elegant," and I really wouldn't hesitate to recommend git to a lot of projects, big or small, discounting specific needs, but I guess you've got some specific concerns that really don't translate well into simple statements.

I've used mercurial only to get some external requirements or tools going, and never used fossil. Could you elaborate a bit on why git is worse than either of them and why I should consider switching ?

2 comments

> To use git you need to know clone, pull, commit, push. For larger projects branch and merge

What if you committed to the wrong branch? What if you tried to merge commits from another user and made a mess of it all? What if you pushed something you want to roll back? What if you committed with the wrong commit message and want to fix it? What if you followed the policy of "commit often" but ended up with lots of irrelevant commits, and want to fix this so that it only has meaningful commits. How can you find who committed what? Or which branches contain a commit?

I know how to do all of this. But these are genuine questions a user of git will need to get answered, and git quickly becomes confusing/inconsistent once you're off the "happy path".

You need to know much more to use git in anything involving more than one branch. You need to know git checkout, git stash, you need to know how to fix conflicts, you need to know rebase vs merge and how to understand git log when you use merge, you need git reset, you probably need git cherry pick occasionally.

One of the major day to day annoyances is the fact that (by default) I can't work on multiple branches without committing or stashing all the time, since switching branches, instead of being a simple 'cd' like in other VCSs is instead a destructive operation on my entire repo (also causing re-indexing for all content-aware tools...). And if I want the normal behavior? I need to learn some other commands to set that up, and learn their filesystem restrictions...