Hacker News new | past | comments | ask | show | jobs | submit login

I really tried to like jj but I couldn’t make it work for my workflow:

There are files that are committed to repository that I need to edit (e.g. .envrc files, which cannot be overridden). There is no way I can ignore those in Jujutsu.

In plain git I can do sparse checkout using negative paths and it works. jj doesn’t support it, and using positive path doesn’t work as I never know if new files are there.

Every push was a dance around removing my changes. I’m checking if there’s progress from time to time but there’s no so far.

But just yesterday I decided to check git branchless as I’m exploring stacked PR workflow and I can say it’s intriguing and even if more rough around the edges than jj I haven’t yet found any showstoppers.






I would say that having files in the repo that you have to change but are not allowed to commit is more an issue with the project setup than with jj. The way this is usually done (at least where I work) is to have e.g. an `.env.example` file in the repo containing default values which the developer copies to `.env` after cloning the project (usually done by a setup script) - `.env` can then be changed, but is in `.gitignore`, so you don't accidentally commit it.

There are always edge cases. VSCode still does not let you have a personal configuration file for a project[0] (open since 2016). There are workarounds, but many of them are less good than just manually ignoring the modified file.

[0] https://github.com/microsoft/vscode/issues/15909


can't you just add them to gitignore? if you want it to be local only, there's also .git/info/exclude or for all your repos with ~/.config/git/ignore

I think OOP meant to say that the `.envrc` file _is_ committed, but they want to do local changes _without_ the possibility of them getting accidentally committed by mistake.

the simple workaround would be to have .envrc optionally load another gitignored file if it exists, which sounds much safer than accidentally committing local changes, even with plain git.

If that's not possible, maybe OP can rename it to .envrc.example, and commit that. Then put in the instructions to rename .envrc.example to .envrc on checkout

Unfortunately neither of that worked, as those are multiple monorepos with different code owners. JJ is nice, but not worth that much of a work around it..



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: