@b0rk I teach grad students that are new to Git, and their most common struggles are:
- understanding the commit messages are put in the whole repo, not just the pull request
- understanding that changing branches can make their files "go away" and that that is okay/expected
- understanding that being in feature branch 1 when creating feature branch 2 is not the same as being in main
- what makes a good commit message (but we all suffer from this)
That there is a command 'git rebase -i --autosquash' which you can combine with 'git commit --fixup' to do pretty effing advanced history editing.
I only learned about that after more than a decade of using git. Thanks Stefano!
- replies
- 0
- announces
- 0
- likes
- 0
@b0rk I've been using git for more than 15 years.
Things I learned only in the last 5-10 years: git rebase -i (rebasing, amending commits, dropping commits etc.), git reflog (finding old heads)
@b0rk
Actually, someone told me to configure this alias, and it has been sooo useful:
[alias]
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
@b0rk "You don't have to understand it all at once. 4 commands will get you 90% of the way; just get started."
@b0rk `git diff -w` hides whitespace only lines. This means indenting blocks are less distracting.