Hacker News new | ask | show | jobs
by alexeiz 3373 days ago
This is spot on. I have observed this very thing happen with co-workers who abuse git aliases to "avoid git complexity." They have an alias for, say, "add everything, commit and push" and they end up committing all kinds of random files to the repository. Or with another alias, they manage to merge random branches into their working branch and they don't understand how that happened.

Another example is the VS Code "git sync" button. I'm never quite sure what's going to happen if I press it. Will my branch get merged with upstream? Or rebased? Am I going to end up with the working tree in the unpredictable state?

This is where the Python guideline "explicit is better than implicit" applies to git perfectly. Git already does a substantial amount of work under the hood with porcelain commands. There is no benefit of stripping git off the fundamental concepts like branches, remotes and staging. It doesn't simplify the conceptual understanding of git, but only obscures the git behavior.

1 comments

> VS Code "git sync"

pull† + push, that's it, nothing more.

† that is fetch + merge or fetch + rebase depending on the branch.<branchname>.rebase git config entry