3 ms·
You need to add `git stash` to move to a different branch while having changes wide open. You also need `git log` with all sorts of arcane options if you actua
by simiones 7y ago
You need to add `git stash` to move to a different branch while having changes wide open.
You also need `git log` with all sorts of arcane options if you actually want to use the history.
- dahart 7y agoGit log is probably the single git command I use most often. Stash can be useful, but it’s good to know that you can get by without it very easily, there’s nothing you can do with stash that you can’t do with commits & branches, and stash doesn’t have the same safety mechanisms that commits have. I think the biggest git accidents I’ve seen, where people have gotten confused in the middle of a merge and lost their work, are due to using stash.
- panpanna 7y agoI prefer using "tig" for browsing the commit log. "git log" is just not usable in real world. Stash is something I try to avoid after multiple accidents.
- dahart 7y agoFull disclosure, I have a wrapper script to make git log output a lot more readable for me, it columnizes and shortens and colors the output. I’d agree the defaults are not amazing, and even with log’s many arcane options it’s very difficult to make it feel smooth.
- ufo 7y agoViewing the git history is one of the handful of things where I prefer a GUI (gitg) instead of the git command line.
- commandersaki 7y agoSince using `git worktree` I never use stash.
- collinmanderson 7y agoyes, `git stash` is incredible useful. Also needed for `git pull --rebase` when there are uncommitted changes.