-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Allow adding files to .gitignore #38089
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
Conversation
New files in the git panel can be added to .gitignore via the conext menu.
|
Nice idea, wouldn't it be better to use zed/crates/project/src/project.rs Lines 2739 to 2742 in eaa1cb0
|
Great suggestion, thanks! I adjusted the code accordingly. |
cole-miller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening a PR! +1 to having this as a feature, but I think we could improve the handling of the .gitignore file a bit. Right now the code always opens/creates the .gitignore at the worktree root, which is not necessarily the same as the repository root, since you can open a parent or child directory of a git repository in Zed. We should make sure to edit the .gitignore at the repo root.
|
Thanks for the review and the suggestion. I changed it accordingly. |
cole-miller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looking good, just a couple of small things and this should be ready to merge!
144a300 to
e677a3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks like just a lint or two that needs fixing now.
Head branch was pushed to by a user without write access
This feature allows users to add a new, untracked file to `.gitignore` by using the context menu in the git panel. <img width="300" alt="Demo screen shot" src="https://github.com/user-attachments/assets/3f2402fb-9337-42f8-939f-dac12ca09518" /> Release Notes: - Added feature to add a new file to `.gitignore`
This feature allows users to add a new, untracked file to
.gitignoreby using the context menu in the git panel.Release Notes:
.gitignore