Hacker News new | ask | show | jobs
by kjohanson 100 days ago
Yeah, I start most of my sessions now with “read the diff between this branch and main”. Seems like it grounds and focuses it.
2 comments

Slight tangent: you want to read the diff between your branch and the merge-base with origin/main. Otherwise you get lots of spurious spam in your diff, if main moved since you branched off.
In jj this is jj diff -f ‘fork_point(trunk() | @)’. I have an alias for it.
What's jj? In Git I also have an alias for diffing against the merge-base. (It's also what GitHub gives you by default in the webview.)
One thing that seems important is to have the agent write down their plan and any useful memory in markdown files, so that further invocations can just read from it