4 ms·
Even better (IMHO!) is `git config branch.sort -committerdate` (note the `-`). This will sort newest committer date first.
by asb 1mo ago
Even better (IMHO!) is `git config branch.sort -committerdate` (note the `-`). This will sort newest committer date first.
- pkaodev 1mo agoI have this as an alias in my .zshrc!! Very handy
- mmsc 1mo ago`git config --global branch.sort -committerdate`
- hsuduebc2 1mo agoThanks!
- nulltrace 1mo agoRebase an old branch and it suddenly looks recent again. The rewritten tip gets a fresh committer date.
- quuxplusone 1mo agoYes. This is what one wants, since if you have recently rebased it, you're clearly doing work with it. Meanwhile, branches you don't care to touch sink to the bottom of the list.
- seattle_spring 1mo agoI would hope so
- mmsc 1mo ago.gitconfig: ``` [rebase] instructionFormat = %s%nexec GIT_COMMITTER_DATE=\"%cI\" GIT_COMMITTER_NAME=\"%cN\" GIT_COMMITTER_EMAIL=\"%cE\" git commit --amend --no-edit%n committerDateIsAuthorDate = true ```
- johnwheeler 1mo agoEven better, "hey, chat GPT, list my branches by commit date." I know that's not a popular answer, but I'm just trying to demonstrate the reality that this kind of knowledge isn't specialized anymore.
- hsuduebc2 1mo agoHeh. "Just Google it" answers we're never particular conversation lubricant as they are not now. But of course you are right we live in age of wonder once again.
- sublinear 1mo agoWhat makes knowledge "specialized" to you? Most devs use git. Even better than ChatGPT is just doing the thing on reflex. Not every manual step is necessarily a tedious chore nor even slower when you actually know what you're doing. I'm not saying this out of hubris, but there's no man vs machine story here when the machine needs babysitting and is still worse at everything. Nobody is resisting AI at this point. We just need to get shit done and that always requires knowing something. Every new technology quickly hits a ceiling and finds its niche. This isn't it.
- johnwheeler 1mo agoIt's not worse than the man. It's better. You're just trying to protect your ego. It's ridiculous.
- sublinear 1mo agoI'm fairly certain that at least half of the people commenting (and all of the people who downvoted you) have over a decade of git muscle memory in their fingers. That's far faster than asking AI, and sometimes probably even faster than their terminal can print. I promise you nobody is trying to show off. Git's CLI is notoriously inconsistent and verbose, and every GUI for it is always missing a ton of relevant features because it was designed for someone else's itch. Now we have people like you trying to wedge AI into the discussion. I'm sorry dude. There's nothing to argue here. Git is the most important tool we have as developers. It's worth learning because the whole point is precise changes. We put up with the bad interfaces because it's otherwise just that good.