Hacker News new | ask | show | jobs
by sgjennings 554 days ago
The way I handle that with jj is to keep those changes in a commit “on the side” rather than making them “on top” of the working copy. The FAQ entry for this describes the process (https://martinvonz.github.io/jj/latest/FAQ/#how-can-i-avoid-...):

- Make a commit off main that includes these private changes

- Make a commit for the work you’re doing

- Create a merge commit on top of these two changes and work there

This works because the “DEBUG=true” change is already committed, but in a commit you never push to the remote. jj makes it easy to continually squash the work you want to keep from the merge commit into one where it belongs. And, there is a “private commits” setting you can use to prevent accidentally pushing that commit somewhere.