zed icon indicating copy to clipboard operation
zed copied to clipboard

Source control view panel

Open aarroisi opened this issue 1 year ago • 41 comments

Check for existing issues

  • [X] Completed

Describe the feature

I would like to request a Source Control View, like the one in VSCode where I can see all the changes and staged changes I made in the project. This is very useful for me to review my work before submitting a PR. Maybe you can add a button to open a tab consisting of this information at the bottom left of the screen, right next to the button to open Project Diagnostic. That would be very helpful.

If applicable, add mockups / screenshots to help present your vision of the feature

Screenshot 2023-11-08 at 10 12 53

aarroisi avatar Nov 08 '23 03:11 aarroisi

Hi, I came from Vscode and heavily relied on the above feature. Since using zed I switched to github desktop and honestly, I feel like my workflow/productivity has improved. Sure the inline diff is essential and some kind of inline blame would be nice. But is version control really the responsibility of the editor? My personal opinion is that I would rather see energy put into things that are clearly the responsibility of the editor.

Otterpocket avatar Nov 08 '23 10:11 Otterpocket

Yes! It makes sense we would build out a new panel (a git panel) that lives in one of the docks. We definitely want to support git operations! :)

JosephTLyons avatar Nov 10 '23 22:11 JosephTLyons

Please have a look at https://github.com/timbrel/GitSavvy for inspiration if this feature gets implemented. It's the reason I'm still using Sublime Text

luwes avatar Jan 25 '24 22:01 luwes

Hi, I came from Vscode and heavily relied on the above feature. Since using zed I switched to github desktop and honestly, I feel like my workflow/productivity has improved. Sure the inline diff is essential and some kind of inline blame would be nice. But is version control really the responsibility of the editor? My personal opinion is that I would rather see energy put into things that are clearly the responsibility of the editor.

Git changes view / diff / cancel, etc operations are definitely something that would prevent me from using Zed.

VScode for example, has decent way to compare / merge changes. Not everything works well there tho, but it greatly improves productivity. (I'm using both Git Desktop + Built in code editor git features just because VSCode Git features isn't enough)

I think this could be selling point of Zed, if Git features would work better than in VSCode, then use of Github Desktop wouldn't be necessary.

coolemur avatar Jan 26 '24 16:01 coolemur

As an extended feature - it would be nice to have a git graph - This is vscode extension but a real game changer and I moved from others git UI's. Simple, intuitive, and powerful.

Graph tree: image

Context menu: image

Commit changes: image

vitalics avatar Jan 30 '24 12:01 vitalics

It looks like Zed already has a partial support for Git.

image

In the editor window, I see a yellow vertical bar for changed lines. In VSCode, this bar is clickable and I could undo or see the exact changes. But in Zed it's non functional.

In the file explorer window, untracked git files appear in green, modified files appear in yellow.

This is my №1 request from Zed editor. Currently using VSCode's Source Control view for reviewing changes.

shinebayar-g avatar Feb 07 '24 16:02 shinebayar-g

+ "Stage selected" and "Unstaged selected" commands

jasongitmail avatar Feb 09 '24 19:02 jasongitmail

Curious what others are using in the meantime to have a nice commit review/diff workflow? This is really the one thing preventing me from using Zed as my primary editor, the ability to review diffs in my change, switch branches, make commits, push, etc. is so useful when editing code that it's hard to live without it. Are you just doing everything in the terminal for now?

jasonyavorsky avatar Feb 11 '24 12:02 jasonyavorsky

Curious what others are using in the meantime to have a nice commit review/diff workflow?

I'm keeping the project open in Cursor/VSCode too showing the Source Control view. zed + old IDE. 😆

jasongitmail avatar Feb 11 '24 15:02 jasongitmail

Curious what others are using in the meantime to have a nice commit review/diff workflow?

I'm keeping the project open in Cursor/VSCode too showing the Source Control view. zed + old IDE. 😆

Sounds like working on VSCode with extra steps

coolemur avatar Feb 11 '24 15:02 coolemur

Curious what others are using in the meantime to have a nice commit review/diff workflow? This is really the one thing preventing me from using Zed as my primary editor, the ability to review diffs in my change, switch branches, make commits, push, etc. is so useful when editing code that it's hard to live without it. Are you just doing everything in the terminal for now?

Github desktop, highly recommend giving it a go

Otterpocket avatar Feb 12 '24 16:02 Otterpocket

Showing an AI suggested commit message based on contents of the git stage, would be a nice time saver too.

jasongitmail avatar Feb 14 '24 16:02 jasongitmail

I'm not sure how many Emacs -> Zed converts there are out there, but if Zed had something like Magit I'd jettison my 20 years of dotfiles and muscle memory (well, pinky RSI) in a hot second.

benswift avatar Feb 15 '24 00:02 benswift

@jyavorska yeap, only integrated terminal :S

emersonjds avatar Feb 16 '24 18:02 emersonjds

Never liked the git panel in vscode and was running lazygit in the vscode terminal for a better experience. Doing the same in zed.

etiennelacoursiere avatar Feb 23 '24 16:02 etiennelacoursiere

I personally like the git panel, especially the diff view in VSCode. I think adding it to Zed will make it all the more better, just my personal opinion though.

jacobtt21 avatar Feb 23 '24 17:02 jacobtt21

This is the only thing preventing me from leaving VSCode. The lack of Git Panel is a deal breaker. Would love to have it.

Chimpaya avatar Mar 01 '24 10:03 Chimpaya

it would be nice to have a git graph - This is vscode extension

I loved this but it's no longer maintained and has since been replaced by GitLens.

Never liked the git panel in vscode and was running lazygit in the vscode terminal for a better experience. Doing the same in zed.

Boosting the workaround in https://github.com/zed-industries/zed/issues/4367#issuecomment-1961591899. There isn't much I miss using https://github.com/jesseduffield/lazygit in Zed. In particular you can drag your terminal to become a full editor tab. It also integrates with https://github.com/dandavison/delta for pretty diffs. Zed 2024-03-03 at 12 15 04@2x

texastoland avatar Mar 03 '24 18:03 texastoland

where is this feature from the timeline or roadmap perspective? Is someone actively working on that or there are things with higher priorities than that one for now?

anton-patrushev avatar Mar 12 '24 17:03 anton-patrushev

it would be nice to have a git graph - This is vscode extension

I loved this but it's no longer maintained and has since been replaced by GitLens.

Never liked the git panel in vscode and was running lazygit in the vscode terminal for a better experience. Doing the same in zed.

Boosting the workaround in #4367 (comment). There isn't much I miss using https://github.com/jesseduffield/lazygit in Zed. In particular you can drag your terminal to become a full editor tab. It also integrates with https://github.com/dandavison/delta for pretty diffs. Zed 2024-03-03 at 12 15 04@2x

Lazygit is cool and all, but this is just a workaround. Which also requires additional tool installation and tiny bit of configuration. This should be built in functionality so when you install Zed, you could use it right away. Most of IDE's and Editors have it built in (VSCode, Intellij for example).

coolemur avatar Mar 17 '24 14:03 coolemur

What's the progress on this? I think this is the only missing part in the Zed text editor that keeps me using VSC from time to time. I'd like to switch entirely to Zed

Ph0enixKM avatar Mar 25 '24 11:03 Ph0enixKM

The VS Code features of Source Control, Github Copilot commit generator, changes viewer and usage of Git in the panel are the points that I need in my Zed editor, besides that it's amazing.

julianblanco00 avatar Mar 26 '24 18:03 julianblanco00

Besides VS Code Zed can inspired from Intellij VSC, I think they have best merge conflict fix UI.

smdedar avatar Mar 28 '24 09:03 smdedar

Besides VS Code Zed can inspired from Intellij VSC, I think they have best merge conflict fix UI.

JetBrains IDE has a way more powerful VSC GUI 💯

anton-patrushev avatar Mar 29 '24 09:03 anton-patrushev

For me this is absolutely huge. My two cents is that I actually don't care about the interactivity of a Git UI in my editor, but being able to view the diffs before committing was a big part of my workflow. I guess also reverting any changes using the UI was a thing I did as well, but not as critical

wagslane avatar Mar 31 '24 05:03 wagslane

Besides VS Code Zed can inspired from Intellij VSC, I think they have best merge conflict fix UI.

VSCode actually has the same feature as in the IntelliJ 3-column merge editor: https://code.visualstudio.com/docs/sourcecontrol/overview#_3way-merge-editor

napalmpapalam avatar Apr 03 '24 07:04 napalmpapalam

To answer the questions around "is someone working on this?" and timeline: yes, I am working on this. Timeline/sequence is in here: https://github.com/zed-industries/zed/issues/8665 git blame will go out in today's preview release. After that: inline git blame, then git status/commit/...

mrnugget avatar Apr 03 '24 12:04 mrnugget

Curious to see how others are using lazygit with zed. My VSCode workflow was CMD+g g which ran a task that ran lazygit and made the terminal view fullscreen and then quitting lazygit closed that terminal that was spawned. I've been having a hard time getting this to work with the Zed tasks mostly around getting the terminal to full screen when I spawn the task. Anyone have anything like this working?

sheaj98 avatar Apr 10 '24 14:04 sheaj98

@sheaj98 - I would love something like that in zed as I used similar in nvim too.

<leader>gg just opened lazygit in full floating window q to exit

Git operations are so fast yet so controlled in that flow. I guess equivalent would be being able to bind a key that:

1: opens a jump terminal 2: maximises it 3: executes any command 4: bonus: closes the terminal when the process for the command ends

erzz avatar Apr 24 '24 08:04 erzz

This is the only thing preventing me from leaving VSCode. The lack of Git Panel is a deal breaker. Would love to have it.

Same !

antoine-df avatar May 07 '24 12:05 antoine-df