Hacker News new | past | comments | ask | show | jobs | submit login

The CLI for Git is one of the most confusing CLIs I've ever seen. I can describe all the warts here, but other did that better than me: http://stevelosh.com/blog/2013/04/git-koans/

Besides the inconsistencies, there are many gotchas which keep tripping developers. For instance, git pull always tries to merge in the remote branch, but you almost never want that. You can do: git pull --ff-only, but most developers I know don't know that and end up with a mess they have to spend time cleaning up.

The main issue is that git commands mix up so many concepts and the defaults are almost always useless. For instance, git add manages tracking files and staging commits. git rebase both deals with rebasing and history clean-up (rebase -i).

A better CLI would just have consistent clear verbs that expose the git model properly instead of mixing up concepts:

  git track    <file>
  git untrack  <file>
  git stage    <file>
  git unstage  <file>
  git commit
And the syntax for creating/deleting/removing branches, remotes and tags would be unified.



Fire and forget as part of team setup guidelines:

    git config --global pull.ff only




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: