Earlier quoted context omitted.
After learning Jujutsu, I realized this is really wrong. The underlying data structures and operations are great, and they serve their purposes really well (such as supporting 10k+ people collaborating like you mentioned). They are what makes git great. The git command line interface is a needlessly complex abstraction on top of them that tries to encourage certain behaviors, but does a really bad job at it.
100% agree. The fact there are 5 different ways to do the same thing is BAD, not good. Have one well defined, documented clear way to solve a problem.
Git cheat sheet [pdf]
71–80 of 146 posts
Re: Git cheat sheet [pdf]
#72Most simple use is to know what you are about to push. Second use case is getting a commit list for release notes when using deployment/promotion branches.
Super useful, I thought everyone used it but maybe some don't know!
Re: Git cheat sheet [pdf]
#73Love this. I would add: git commit —-fixup $COMMIT_ID combined with git rebase -i upstream/master —autosquash These have become staples of my recent workflow. Julia’s example uses HEAD^^^^^ to rebase the previous 5 commits. I have been doing this as HEAD~5, until recently I realized you can just rebase all commits up to the upstream HEAD.
git commit —-fixup $COMMIT_ID
I'm adopting this immediately. I always make little "oops " commits like "oops GET users/me" and then manually move and fixup them on my next interactive rebase. This is much better!Re: Git cheat sheet [pdf]
#74Earlier quoted context omitted.
The skillset to navigate this is one of the underappreciated challenges of teaching.
Exactly zero of my mathematics professors, and a large portion of my CS professors managed to adequately account for this. The professors of mine who did manage it remain firmly in my memories as great people and great teachers, while the one's who didn't inhabit an area between complete memory erasure, and disdain for how hard they made my life. This is at the very core of what it means to be a teacher, not just kno…
> Twenty minutes later he returned, smiling, and began: "Yes, it is obvious that..."
Re: Git cheat sheet [pdf]
#75Re: Git cheat sheet [pdf]
#76Having said that I think it could more clearly state the author's typical preferred practice for updating a branch and integrating it with main when you're done. There's a few techniques listed for diverged branches, but then fast-forward merge is in its own box and it's not super clear how you might use working-branch rebasing with it to eliminate divergences in the first place (even though it's hinted at under "pull changes").
I wonder if it would be clearer to say something like "combining branches: rebase your branch and do a (FF) merge, optionally with squashing," or however they like to do it.
Re: Git cheat sheet [pdf]
#77Re: Git cheat sheet [pdf]
#78Based on the above statement, I find it extremely weird to see such git command named "blame", then I realized I'm not the only one:
What does 'git blame' do? [1].
Blame someone else for your bad code [2].
Git blame should be called git credit [3].
Does Git Blame sound too negative? [4].
______________________________
0. https://skeptics.stackexchange.com/questions/19836/has-phil-...
1. https://stackoverflow.com/questions/31203001/what-does-git-b...
2. https://news.ycombinator.com/item?id=27963868
3. https://dev.to/damcosset/git-blame-should-be-called-git-cred...
4. https://www.reddit.com/r/ProgrammerHumor/comments/r5lzyo/doe...
Re: Git cheat sheet [pdf]
#79Earlier quoted context omitted.
Yes. Because git was created by Linus Torvalds specifically to enable and advance Linux kernel development. The fact it has become so widly adopted is a "happy accident" (or misery). Github I think has been widely credited with making git so common place ("free git hosting") but I don't think git is the "ideal" revision control system for many projects. Because it was made for Linus for Linus/Linux, this is why the t…
> Mercurial got the "user interface" and command-set right and has some nifty features (being able to launch a web server on the fly to get a tree view of your changes) but being written in Python, performance and scalability aren't ideal. I used to think Mercurial had a better UI but I changed my mind after taking the time to understand Git. Mercurial does have nifty features but Git's way of working isn't hard or e…
Re: Git cheat sheet [pdf]
#80If your mission is to make hard topics easier to understand, why are you using a hard-to-read font whose only purpose is to make the cheat sheet look folksy?