7 ms·
Maybe it's just morning, or maybe I'm a luddite, or both, but my knee-jerk reaction to this was "why does anyone need this? Just learn git." But then I saw the
by ryukoposting 4y ago
Maybe it's just morning, or maybe I'm a luddite, or both, but my knee-jerk reaction to this was "why does anyone need this? Just learn git." But then I saw the "explain" command, and then I read that you're a new CS student.
That got me thinking about the first time I really screwed something up and had to figure out how to use git rebase, and the first time I tried to create a git submodule (back when submodules were new and there wasn't much help to be found on StackOverflow). I must have let the Stockholm syndrome set in, because the "explain" feature is a wonderful idea for students.
The dead-simplicity of it is very desirable in certain spaces. Back when I was in college, I wrote code for some indie visual novel games, and I was always the only person with a software development background. If I had a tool like this, it would have been MUCH easier for my colleagues to cooperate with me in the development process.
- mattbrewsbytes 4y agoI agree with the just learn git part. We are all students when it comes to learning something new to you and this career is a constant stream of learning things. So my advice would be to deeply learn what your tools are doing and do that by trying out different things in a zero risk sandbox. Git is decentralized, you can setup a local repository that you can use for practice and to learn what is going on.
- empyrrhicist 4y agoGit and its particular interface aren't deep facets of the universe we need to get used to, building better tools and exploring new interfaces is exactly what we should be doing. Sure, learn Git, but that's not a reason to give up on alternatives.
- bachmeier 4y ago> this career is a constant stream of learning things The whole point of software engineering is to write software that makes our lives better. Why would "deal with it" be the right answer to the horrific mess that is the Git UI?
- Xelynega 4y agoIt's not really "deal with it" it's "learn the tool to start using it effectively". If someone is having trouble learning how to use a lathe, that doesn't mean lathes are a "horrific mess" and need to be reworked, it means that person needs to learn more about the tool they're using and how to use it.
- badrequest 4y agoIf using the tool effectively is burdensome enough, then it's the same as "dealing with it".
- scubbo 4y agoWell, yes, but "enough" is doing a lot of heavy lifting there. Learning git is a large and steep learning curve, but the benefits from doing so outweigh the costs.
- olyjohn 4y agoSure but if you can make a tool that saves you 5 minutes of time on a lathe every time you use it, you may be a fool for not doing it. That's the whole point of building tools.
- nuancebydefault 4y agoIn industry they use CNC millers, I guess many workers found lathes too unhandy and slow.
- nuancebydefault 4y agoAn alternative frontend to git cli is a good idea, since several git command names are very counter-intuitive. Git checkout to switch to a branch that you already have checked out, git add for adding new files, for marking resolved as well as for staging. Git status only shows your local status without looking at the server. The frontend can be a ui or a cli like this with a good explain command. It is important though that the final git commands are shown, such that you can learn, and find more details on the internet when needed. So learn, yes, but whilst avoiding many initial pitfalls.
- stronglikedan 4y agoIn my case, a lot of the complexity of Git is in the edge cases. Like, I rarely if ever have to revert, but when I do, it's very stressful to remember everything to get it right. This will certainly eliminate that occasional, but monumental, stress.
- jonfw 4y agoThe revert command is a good, easy solution- "git revert <commit-hash" run "git log" to grab the commit hash The really challenging parts of git IMO are around maintaining branches. Merge vs rebase, squash or no squash, when to back-merge, etc.
- zikduruqe 4y agoThat's what tig is for. https://jonas.github.io/tig/ https://jonas.github.io/tig/
- dahart 4y agoRevert is normally extremely safe, I’m curious why it’s ‘monumentally’ stressful? The best thing to learn about git is what the safety nets are, what commands do destructive edits, vs what commands do things you can undo. Once you know how to recover from all the non-destructive commands, you never have to stress about them again! The reflog is weird and confusing at first, but once you know it’s here and a little about how to use it, all of a sudden you realize it’s pretty hard to lose things, as long as you commit them.
- noufalibrahim 4y agoI agree with the just learn git part. However, a first year college student building something and putting it out in public is a great achievement and something to be condemned.
- atuladhar 4y agoI'm sure this was a typo, but I don't think you meant "condemned." Maybe "commended"?
- Cyphase 4y agoRefreshed before I commented to say this and saw your comment labelled "0 minutes ago". :)
- noufalibrahim 4y agoCommended. Yes. Stupid autocomplete on the phone.
- dieselgate 4y agoi laughed at seeing that above too - who knows? in other industries it's common to lay the crap on the new guy but haven't experienced that as much in software
- joshmanders 4y ago> [...] great achievement and something to be condemned I assume you mean "not condemned" or "commended" possibly?
- euroderf 4y agoThere's also "condoned".
- deleted 4y ago[deleted]
- 4y ago
- kodah 4y agoGot requires a mental model. I've tried to teach git without the mental model and it just doesn't work. There's a whole pack of people on the internet who refuse to learn the internals and complain incessantly about it. I don't think there's anything wrong with them, but it's a signal that for some folks conceptualizing what's in the docs is difficult for them. The explain command I think could go a long way in doing that, similar to how I used explain to learn SQL.
- hangonhn 4y agoDo you have a good guide to the mental model of git? I agree with you and I think that's what preventing me from getting more familiar with it.
- kodah 4y agoThey used to have a page that summarized it all, but now there's a book! https://git-scm.com/book/en/v2 https://git-scm.com/book/en/v2
- osigurdson 4y agoI have a fuzzy jpg level understanding of the internals and I do completely fine with ~10 git commands. I’ve actually seen the opposite where people dive into the details and kind of get lost, give up and end up with a fragmented mental model that leaves them afraid to touch it.
- quickthrower2 4y agoMy rough mental model is each ref is like a .zip of your source code. Branches point to these. When you commit you create a new ref, it points to it’s parent and the branch now points to it.
- ryukoposting 4y agoTo what extent should educators be responsible for teaching Git? I learned just enough to push to master for my assignments, and handle merge conflicts. Profs didn't care if you knew Git, they cared if you know how red-black trees work, or how CANBus works.
- globular-toast 4y agoI agree with learn git, but learning git doesn't make git's CLI good. I would love a CLI equivalent of magit that I could recommend to people.
- FreeFlyFall 4y agoHave you heard of LazyGit? It's a Git TUI.
- hardwaregeek 4y agoIMO git would be way better with different naming and some UX improvements. Like a git undo[1] command, or renaming git reflog (git usage or git cmdlog), git blame (git author), and so on. Also stuff like the index, while great for experienced developers, leads to a lot of confusion early on. I'd love a command pallet where you could search for basic behavior in plain text like "reset my branch to GitHub's copy" or "only rebase two commits" and have it find the magic incantation. [1]: https://blog.waleedkhan.name/git-undo/ https://blog.waleedkhan.name/git-undo/
- adql 4y ago> git reflog (git usage or git cmdlog) It kinda needs separate command that shows you both reflog entries and commands that lead to it. Maybe merged with undo command so you could look at the history of operations, go back to that point, and get alert if you skip something already pushed upstream. git rebase -i is essentially "undo" of sort but, uh, not a tool for faint hearts. > git blame (git author) I doubt people are confused by that > I'd love a command pallet where you could search for basic behavior in plain text like "reset my branch to GitHub's copy" or "only rebase two commits" and have it find the magic incantation. "git do" that just asks ChatGPT and pastes solution lmao.
- 0x457 4y agoI've been using git for years and do `rebase -i` daily, bisect many spooky commands. However, I still don't know how I can update a branch and switch to it in one motion: - not just update `origin/branch` - not checkout `branch` and sync it with `origin/brach` and it drives me crazy.
- NathanOsullivan 4y agoNot aware of a built in way, but if you use bash or similar as your shell you can do an alias like git config --global alias.chpull '!f() { git checkout "$1" && git pull; }; f'
- 4y ago
- adql 4y ago> Maybe it's just morning, or maybe I'm a luddite, or both, but my knee-jerk reaction to this was "why does anyone need this? Just learn git." Knowing the git enough to not need crutches is opposite of luddite. But yeah, for devs sure, just read git book 2 or 3 times and if you're competent developer you'd probably get it just fine, once you get the concepts it's perfectly logical. Just that not everyone is a developer wanting to use git for dev things and those UIs have place for that. I kinda wish there was more on the graphics side, like you can tell git how to diff binary files or even encrypted files but good luck explaining that to the non-coder trying to use it. I still don't get developers complaining about it, it's your fucking main tool to work and about 10x easier than competence in any programming language, just learn it, you will use it longer than any piece of code you ever wrote most likely.
- michaelmior 4y agoI think in general, git is not a great tool for developers. If non-developers are required to use git, I think you may have a process problem. However, if that's the state of things, I think non-developers are probably better served by a GUI than a CLI command.
- qez2 4y ago[dead]
- zem 4y ago"just learn git" unpacks to two different things - gaining an understanding of the git model and how the various operations query and modify the repository state, and learning the arcane minutiae of git's command line invocations. the former is indeed a very valuable part of levelling up as a developer; the latter is only useful insofar as you have to interact with the `git` command line tool. it has no intrinsic worth, and if someone would rather write and use `gut` instead, more power to them!
- jsonjason 4y agoMy first reaction was "git already has an easy to use CLI!" But reading a bit more of the post I definitely see how many things I don't think about anymore aren't as intuitive to a newcomer. And hats off to this student for making themselves a tool. (Probably ended up learning a lot about git in the process too.)
- lttlrck 4y agoI work with approx 10 junior developers they use basic push/pull/commit/checkout/cherry-pick git, have no idea how it works, only what it does. Their training composed of looking at a wiki intro and some hand holding. In 10 years by far the biggest git related issue is quality of commit messages... (and maybe the commit content) Suffice to say the complaints about git are alien to me. It seems that either devs need to know very little or everything to be safe. The middle ground falls under "knows enough to be dangerous"; you start getting over confident all fancy with your git moves and screw up. But nothing that can't be fixed.