Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: local changes #3380

Open
Barney241 opened this issue Mar 12, 2024 · 1 comment
Open

Feature request: local changes #3380

Barney241 opened this issue Mar 12, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Barney241
Copy link

Is your feature request related to a problem? Please describe.
Imagine that you are working on a project and you need to set envs for local dev environment or u want to comment out cron so it doesnt run if you dont need it. this produces git changes that are intertwined with actual feature or bug changes that you are working on and sometimes you miss some changes when comitting in this pile of all things.

Describe the solution you'd like
I would like if possible something similar to jetbrains local changes. you select git changes and move them to local changes which basically ignores them and you have only wanted git changes. this ignores specific changes and not whole file

Describe alternatives you've considered
I tried to google possible solutions and i found:

  • git stash - i know you can stash changes but thats good for saving local config, but when you restore stash you have all changes together
  • git update-index --assume-unchanged is not what i have in mind exactly because you are ignoring whole file here not just single change
@Barney241 Barney241 added the enhancement New feature or request label Mar 12, 2024
@dgm816
Copy link

dgm816 commented Feb 19, 2025

I came across git update-index --skip-worktree <filename> today from this SO post: https://stackoverflow.com/questions/13630849/git-difference-between-assume-unchanged-and-skip-worktree#

I was investigating if I could use this directly in LazyGit or if it would require doing this operation in the terminal. I didn't discover an easy way to do the operation inside of LazyGit but this did solve my issue. I just drop to the terminal and issue it for whatever file(s) are needed since it's typically just a one-off operation in my case.

Also, feel free to follow this issue #3799 for the discussion and this PR #4276 for implementation discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants