2
Seph
2y

Git is overrated. There's absolutely no good reason that `git add` should be default to call before `git commit`, if people don't want files added that should be the exception not the rule. But where it all really falls apart is mono repos. There's no good way to make a repo inside a repo, which is fucking stupid. There's no good way to clone just a chunk of a repo, which is fucking stupid. And -- just in general -- every aspect of git feels like it wasn't designed to be usable. For instance: there should be a command `git save "message"` which does the default `git add ., git commit -m "message" git push`. Or rebasing, that doesn't need to be so hard at all.

This is just a rant and all, but I'm so tired of git being clunky and poorly designed from a UX perspective. And not supporting mono-repos for shit.

Comments
  • 20
    Total disagree on all counts.

    Commits are irreversible, so they should definitely NOT be the default. I use temp files to test stuff and git add with glob patterns all the time.

    There's no good reason to want a "repo inside a repo". Split up your codebase and use submodules/subtrees, or an additional layer with a pkg manager instead.

    Whether monorepo's are a good way of working is debatable but ok (the "repo" is the atomic unit at this level and I would argue cramming multiple (sub)projects in 1 repo is an abuse at the user's end) .
    There is a way to clone only parts, see git sparse-checkout (I think NPM's @types repo advocates using it). Define a bash alias for command shortcuts if desired.

    And just be grateful you don't need to work with SVN?
  • 13
  • 2
    svn bad
  • 5
    If git adds all files automatically (like some IDEs), how would you keep people from commiting sensitive files?
  • 8
    Once u use git more though u will realize it’s whole vibe is centered around fine-grain control. Git add exists not only to give the user control over unstaged, staged, and commited changes (something I would study btw), but it also fits into the same syntactical sugar as a lot of the commands in git. Just use git aliases to make the save command u seek.
  • 0
    @webketje lol commits are reversible?
  • 5
    @phat-lasagna I meant commits are immutable (git revert creates new commit) and better not rebase or reset and force push long-lived branches (~quasi-irreversible)
    Poor choice of words
  • 2
    @webketje I love force pushing - it makes me feel powerful
  • 2
    You might like Facebooks Sapling.

    Check it out.

    Overall, I agree and disagree.

    A lot of your statements care about one specific workflow, which I personally hate - Monorepos are debatable and unless there is reason for it, I'd argue that it's in 90 % of the cases lazy butt syndrome and not needed.

    I can understand the frustration though when dealing with a mono repo - after all Git wasn't designed for it and yeah, thus it is shit.

    But that's the problem when you try to force your workflow into a tool that wasn't designed for it - you get shit.

    *hug* have some pancakes.

    I think Sapling will be good for it, though noone knows if Facebook holds his promises.
  • 0
    Or… use a GUI git client like Fork or Sourcetree?
  • 0
    Thank you.

    Also to others who's brains don't seem to work correctly in the git world...https://ohshitgit.com
  • 1
    I've been using git for 12 years, it's not that I don't understand it. It's that I do, and it was never designed to be this used. We know things now that they didn't back then, and it's time to try again having learned a lot.

    Also, anyone who advises submodules is a moron, those things are trash and always have been.
  • 0
    @Seph
    Submodules are like a claymore.

    You step in it and you will not be happy.

    https://engineering.fb.com/2022/11/...

    Forgot to add the link to sapling
Add Comment