FR: `jj untrack --local`, `jj untrack --ignore`
Is your feature request related to a problem? Please describe.
I want to be able to easily untrack a file and have it stick without having to manually edit a gitignore/.git/info/exclude file. This could be achieved by automatically editing the relevant gitignore file (probably the nearest one to the file for --ignore?) to add the file, and for --local, .git/info/exclude.
Describe the solution you'd like
jj untrack could be taught how to make untracking sticky, and print a warning if the file will get immediately tracked again suggesting the command that sticks the untracking.
Describe alternatives you've considered
Status quo: have to open an editor/type another command to do the untracking operation. Reduce the necessity for untracking things (see #323).
Additional context Add any other context or screenshots about the feature request here.
This could be achieved by automatically editing the relevant gitignore file (probably the nearest one to the file for
--ignore?) to add the file, and for--local,.git/info/exclude.
Just a comment: this could be done a lot more easily if we had some kind of .jj-ignore file supporting jj's fileset syntax. In that case, jj untrack $FILESET is trivial (it just writes $FILESET to the .jj-ignore).
I think this approach of combining the concepts of file tracking and ignoring plays very nicely jj's philosophy of eliminating unnecessary complexity and statefulness from git (like the staging area).
Just a comment: this could be done a lot more easily if we had some kind of
.jj-ignorefile supporting jj's fileset syntax. In that case,jj untrack $FILESETis trivial (it just writes$FILESETto the.jj-ignore).
See #3525 for that specific issue.