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

Git - display incoming/outgoing commits in the Source Control view container #192290

Closed
Tracked by #200518
lszomoru opened this issue Sep 6, 2023 · 16 comments
Closed
Tracked by #200518
Assignees
Labels
feature-request Request for new features or functionality on-testplan
Milestone

Comments

@lszomoru
Copy link
Member

lszomoru commented Sep 6, 2023

The latest Insiders release contains a new "Source Control Sync" experimental view that can be enabled by toggling the scm.experimental.showSyncView setting. This new view displays incoming/outgoing changes for the current branch compared to its upstream, or the default branch. Please give it a try and let me know what you think. Over the coming weeks we will continue to iterate on this view based on user feedback.

image
@lszomoru lszomoru added the feature-request Request for new features or functionality label Sep 6, 2023
@lszomoru lszomoru added this to the September 2023 milestone Sep 6, 2023
@lszomoru lszomoru self-assigned this Sep 6, 2023
@lszomoru lszomoru modified the milestones: September 2023, October 2023 Sep 28, 2023
@tusharsnx
Copy link

Thanks for adding this feature right inside Vscode 😄 I've been using Gitlens just to have this for a while now.

I think the view only shows changes/commits for the current branch. I'd appreciate if we could have a drop down menu for selecting the branch also, so it can show the changes from other branches as well, and not having to checkout branches for the changes to show. The selected branch could be remembered for the entire session, and resets after closing/reopening Vscode.

@tusharsnx
Copy link

As a contributor, many people work on a cloned repo, that has multiple tracking branches to a remote branch on that repo. But, in most cases we want to compare against the original repo's main (or any branch for that matter) where this change will be merged ultimately. Giving an optional "compare against" (along with 'Incoming Changes', 'Outgoing Changes') list item in the view would help in this case.

Current workaround is to use git branch -u original/main local-branch which then makes the 'Outgoing Changes' compare against original/main. However, this will make git push/pull more verbose as you'd have to use cloned remote name with the command every time.

@Wladefant
Copy link

I am a bit new to the party how to I enable this setting?

@gjsjohnmurray
Copy link
Contributor

@Wladefant at the moment you will need to be using Insiders

https://code.visualstudio.com/insiders

@Wladefant
Copy link

Ok not that new. I have insiders installed, but where do I enable this setting?

@lszomoru
Copy link
Member Author

We continued to iterate on this and we have settled to display incoming/outgoing changes in the main "Source Control" view in favour of a separate view. Views are great but they come with a cost, users have to expand, collapse, resize them. Another issue that we ran into is that having a separate view would have meant that we would have moved the "Sync Changes" action button to this new view, which we felt that it would be too disruptive of a change.

image

Users can use the following settings to control whether incoming/outgoing changes are being shown:

  • scm.showIncomingChanges
  • scm.showOutgoingChanges

@jcapcik-np
Copy link

Yes! As a former Sourcetree user before switching to a Windows WSL env, this was a feature I desperately missed. Thank you!

@aosar
Copy link

aosar commented Dec 1, 2023

I am not a fan of this personally, so Im glad I found the setting to turn off. I was scared I did something wrong the first time I saw this.

Additionaly, I don't like the "Sync Changes" button so dangerously close to the commit menu, and in place of the commit button. There a lot of changes I like to keep local or that I want to redo, rebase, cherry-pick, etc before pushing out. I dont want to accidentally hit that button and cause chaos with the history rewriting, being forced to force push to fix it. Not to mention potential security concerns (such as committing a secret that's only meant for your machine).
That could also result in collaborative workflow disruptions. If somebody pulls your accidental change that is not ready to use, then they have to reach out to you, and if you force push a fix then you have to work with them to get back in sync, and it's just a mess.

@lszomoru
Copy link
Member Author

lszomoru commented Dec 6, 2023

@aosar, thank you very much for the feedback. The "action button" in the Source Control view is meant to help with making the "next action" easily accessible. After one commits changes, the button switches to "Sync Changes" as that is the next natural action.

You can control the action button using the following settings:

  • scm.showActionButton - completely disable the action button
  • git.showActionButton - disable action button individually (commit, publish, sync)

@benwinding
Copy link

Future readers... to hide incoming/outgoing in VSCode ^ add this to your settings:

    "scm.showIncomingChanges" : false,
    "scm.showOutgoingChanges" : false,

Polite feedback 🙏

  • I personally found this quite jarring to see this come up in the latest update, and had to Google how to hide it...
  • There really should be a UI option within "Source Control" to toggle this feature

I appreciate the hard work that goes into VSCode. Thank you 🥲

@gjsjohnmurray
Copy link
Contributor

  • I personally found this quite jarring to see this come up in the latest update, and had to Google how to hide it...

I recommend checking the release notes after an update. This section is one of the headline items for 1.85

https://code.visualstudio.com/updates/v1_85#_source-control

@lszomoru
Copy link
Member Author

lszomoru commented Dec 8, 2023

@benwinding, thank you very much for the feedback. Making toggling the visibility of the incoming/outgoing section has come up multiple times but I simply did not get to it. Having said that, I am planning on adding that in the upcoming release.

@cary-hu
Copy link

cary-hu commented Dec 11, 2023

Can we mark the new feature disabled by default. I spend too much time to found how to hide this.

@bonzzo2014 bonzzo2014 mentioned this issue Dec 11, 2023
@eduard-sb
Copy link

This feature currently only shows changes against the upstream branch, however if the commits on the current branch have introduced new files they won't show up. It'd be cool if they did!

@lszomoru
Copy link
Member Author

@eduard-sb, thanks for the feedback. Could you please file a separate issue so that I can track this. Providing a recording would also be really valuable for my to track down the root cause. Thanks!

@Daniel-Griffiths
Copy link

    "scm.showIncomingChanges" : false,
    "scm.showOutgoingChanges" : false,

Not sure if something has changed since, but I had the use the string "never" instead of false

  "scm.showIncomingChanges": "never",
  "scm.showOutgoingChanges": "never",

@github-actions github-actions bot locked and limited conversation to collaborators Jan 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan
Projects
None yet
Development

No branches or pull requests