-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Tracking Issue: git integration #8665
Comments
I think #8663 can be added here. |
Can I add a feature request for a option to have |
I want git blame |
Conventional commit support in Alternatively, we can allow plugins to take care of these things like this one: https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits |
Would be nice if you work in a folder below the git root and get ask if you want to locate the repo (as it is done in vscode). Currently if you are not opening the git root, but a sub directory git support is not enabled. |
Just wanted to drop in there that the new git integration should allow for multiple git's inside an open folder, I like to be able to have my container open so I can work on multiple services at the same time. |
We could also have some form of Merge Editor like it is in Visual Studio Code or maybe something even better |
It would also be great if the proposed source control view is compatible with git submodules, similar to VS Code =) |
Update here: we're going to pause work on the git integration for a few weeks, since we have a lot of projects going on right now — Tasks, Linux, remoting, AI — and are spread a bit too thin. Since we've reached a good pause-point here (just checked off Milestone 1), we'll pause work on git, focus on other projects for a while and then come back to git integration once we've finished other projects or reached significant milestones. |
To soften the wait slightly, I hope to finish and merge #11080 that enabled git hunk diffs browsing in the editor. |
@mrnugget Can the community contribute to this? It would be nice to see the approach and design hosted somewhere so that interested folks can help speed up the process. I myself would like to switch to Zed permanently and am more than willing to help ship this asap. This is a huge and the only blocker for me right now. |
Of course it can, this is the whole point of Zed being open source. I would suggest starting from something small-scoped, come up with the proposals and (ideally) some design drafts to discuss it first — defining the right chunk of work is the most complicated first step here, it seems. Be wary that some subtasks of this "epic" are quite hard, e.g. the whole "show a two panel diff" story will require writing something like https://github.com/zed-industries/zed/blob/main/crates/editor/src/display_map/inlay_map.rs but for git things. |
Of course. Just want the existing specs to be highlighted so that anyone taking this up doesn't re think anything that's already decided on. |
I suspect there's nothing well formed, covering the entire integration task, only a few ideas split between people (right now I work on something related to diffs, there are some design drafts, etc.). So, any proposal could easily be better than the current state. I would not take too much of an effort to draw detailed designs, as @\iamnbutler might have better ideas, but otherwise anything is free to be picked up due to #8665 (comment) |
Anyone's free to help, sure, although I would caution against picking up one of the bigger items — git commit view, git status view, git diff view — since they require a lot of design and conceptual thinking up front on and the Zed team does have opinions on all of them, we just need to find the time to get to it. |
May I suggest a small increment for the git diff view? With the help of the hunk feature recently merged, we could add a "filter" to only see in the project panel the files with the git-status changed. This way we could get a list of all files and if we want to see the diff, we could use the expand all hunks feature for now. |
It would be really nice to have a "Right Click > Open in github.com" or similar for lines that have a clear git blame. |
hey @mrnugget this seems a really low hanging fruit, allowing to filter files in files view by git status being modified. Is anything we can expedite quickly? Would really help with easily going to files that got modified in a "stable sidebar" |
I would argue about My current idea is to reuse current git hunk diffs (inline diffs) functionality, and show all changed places of a singleton buffer inside of a multi buffer (as for search results: we do not show the entire file with multiple matches inside, but rather show take excerpts around the matches and show those in a multi buffer), with the diff hunks expanded always (?). As a first attempt, I will use a single multi buffer for all file entries, and get a project panel to show only the entries, related to excerpts of that large multi buffer — those will be all files that have some git changed metadata (modified/added/removed/conflict/etc.).
Currently, I have a main...kb/buffer-panel branch that, while not related to the git diff explicitly, allows to have a companion "project panel" for any generic multi buffer, with the practical emphasis on the project search view. Moreover, this is the first time in project panel's code history to add some filters on top of the current "all files in the project"-only approach, and besides all the above, it has to deal with performance implication — we can definitely do better than the branch does currently. So, I think I'm getting there and the road is interesting and possible conceptually. |
I would recommend the Zed team (or anyone building software like this) to take a look at the way Jetbrains handles git integration. From basic functionality like commit/pull, to the amazing log interface, as well as the individual file history feature that fits into the git log UI. Even small things like being able to quickly open a file+line number in GitHub/Gitlab. Jetbrains has completely nailed their git integration, it's a fundamental aspect of my productivity and very hard to move away from. edit: in fact, this thing is so good, the community is asking for a standalone git client from them: https://youtrack.jetbrains.com/issue/IJPL-72504/Make-git-client-a-standalone-app |
Completely agree with @joaodlf If Zed can nail JetBrains' level Git integration and at the same time keep the memory consumption close to what it is right now, it will be the hugest win in the world of IDEs. |
Would love to see a list of remote branches to be able to easily select in the dropdown like Webstorm has 🙏 |
A small update on the project diff side: there's a prototype branch https://github.com/zed-industries/zed/compare/kb/project-diff?expand=1 which adds an action to create a multi buffer with all git changes Zed can detect now (modified files only, no staged changes) and maintains buffer's excerpts' order as in the project/outline panels with the FS tree. project_diff.movAs the video tries to show, it reacts on the external FS events and auto expands all new changes in the excerpts. I do not think it's ready to be merged at the current state:
This might be relatively tricky to add though, as would need to create "fake" deleted buffers and store them somewhere (in the same diff view, presumably) — but even this PR would not include this, there should be a plan on how to add these and what are the complexities related.
All this does not seem hard, but still requires a significant amount of work and concentration which I do not have now — so, I will pause with this change for now and use the bits of my spare time on improving the outline panel first. On the grand scheme of things, side-by-side diffs for this part seem to be the hardest task and won't appear before singleton buffers' side-by-side diff is implemented first. Meanwhile, if anybody is interested enough to pick this up and fix the issues aforementioned — welcome a lot. |
Linking here for visibility: #13511. |
Ex-Atom user here waiting for full featured Git integration before I can officially make the switch to Zed. I know you guys can do it! :) |
This would give me the final incentive to switch from vscode/webstorm/neovim to zed. |
It can be confusing with different terminologies, but remember there are more version control systems than git so using generic names in the UI then makes sense. |
I see how that's a reasonable thing to do if you want to paper over the differences between VCSes. I didn't get the impression that's a goal for zed (at least in this issue). |
This comment was marked as spam.
This comment was marked as spam.
It's being worked on, comments like these do nothing but flood notifications. A simple 👍 reaction does the job. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as abuse.
This comment was marked as abuse.
@524c I'm not contributor, but your comment was useless. Just add thumbs up and don't clutter discussions. I'm sure there are better places to show enthusiasm than comments that do not contribute anything to the issue. If you care about some software (like Zed) you should also try to make maintainers and contributors jobs easier - don't send comments that do not add anything to discussion, do not send notifications for no reason. After all it's in your best interest that development is as smooth as possible and you probably can imagine that some people need to follow tens of issues at once so such 'enthusiastic' comments add up and eat time that could otherwise be spent more productively. |
Is this a current view one is supposed to be able to view? I don't see anything in the project view. |
You open it with |
@mrnugget : What Milestone have we reached? |
Milestone 1 |
EDIT: nevermind, I found the setting. ( |
Ideas for committing while doing collab/pairing work:
|
@mrnugget : Where can I find the Milestone developments, on https://github.com/zed-industries/zed/projects?query=is%3Aopen Then the first Milestone goals are already all complete for git. |
Not sure what you're after, but we didn't tag all issues/PRs for this milestone. It was a manual process to check off the checkboxes here. |
@mrnugget : Where can I see the milestone processes? |
Like I said, we didn't use that. I just created that issue you see at the top and checked checkboxes off manually and linked to the relevant PRs. |
For those that like TUIs, I use lazygit from within Zed and perhaps that can tide over some of those waiting for builtin functionality. The general idea is to set a keybinding that opens lazygit in a center terminal as another tab... {
"bindings": {
"cmd-g": [
"workspace::SendKeystrokes",
": new center terminal enter lazygit enter"
// Note: non-vim users would have to do something like below to open the command palette...
// "cmd-shift-p new center terminal enter lazygit enter"
],
}, I do use and enjoy the already builtin blame features in Zed, but not sure I'd stop using lazygit even if advanced builtin functionality were to exist. Maybe a fancy UI for tricky merge conflict resolution, but that would be way off in the future and I tend to crack open Sublime Merge for that anyway. |
Ok, my solution:
sudo ln -sv "/Applications/Sublime Merge.app/Contents/SharedSupport/bin/smerge" /usr/local/bin/smerge
[
{
"label": "Open repository in Sublime Merge",
"command": "smerge $ZED_WORKTREE_ROOT",
"reveal": "never"
}
]
Waiting for zed api to add items to the context menu or button in the footer Credit: |
Problem
Our current git integration is very minimal. What we have:
Many users are asking for more git integration:
Goal
Build a 0.1 of git integration that fixes immediate pain points and stops users from leaving Zed to go to GitHub, GitLab, or another editor to use a git feature.
The most common git interactions should be doable inside Zed: committing, staging, unstaging, viewing diffs, ...
They should allow keyboard-only workflow.
Current status
Work on
git integration
is paused at the moment, since we're spread too thin on a lot of other projects.Roadmap
Ranking here very subjective and based on personal pain points.
Milestone 1 -
git blame
git blame
in gutter, toggle on off - Addgit blame
#8889git blame
inline in the editor - Inline git blame #10398Milestone 2 -
git diff
Milestone 3 -
git status
&git commit
git commit
Things we have to do
Milestone ...
The text was updated successfully, but these errors were encountered: