最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

visual studio code - VscodeGit workflow for reviewing all changes over SSH - Stack Overflow

programmeradmin0浏览0评论

I use Vscode to work on a large project on a remote machine with the SSH extension. I love the built-in source control panel for reviewing changes I have made each time I commit. But now say I have been working on UnstableBranch for a few weeks and have made many changes and many commits. I am ready to merge changes into MoreStableBranch, but I may not want to merge all changes, and I can't remember every change that has been committed on UnstableBranch. Before I submit a PR, I want to review all changes made to UnstableBranch so I can keep the ones I want and not merge the ones I don't.

At the command line I can do this with git diff MoreStableBranch but I want to review the changes using Vscode's side-by-side UI. I tried adding this to my .gitconfig:

[diff]
    tool = vscode
[difftool "vscode"]
    cmd = code --wait --diff $LOCAL $REMOTE

And then when I run git difftool MoreStableBranch from the integrated SSH terminal within Vscode, I am prompted to open the files one-by-one. This works, but I would love to see the whole directory, as you can in the source control panel for uncommitted changes. I tried using the --diff-dir option for difftool but get an error: At least one file must be provided to wait for.

So from a remote machine, how can I pull up in Vscode all the differences between my current working directory (UnstableBranch) and a different branch (MoreStableBranch)?

Also, my Git version is 1.8.3.1 and I don't have permission to update it.

I use Vscode to work on a large project on a remote machine with the SSH extension. I love the built-in source control panel for reviewing changes I have made each time I commit. But now say I have been working on UnstableBranch for a few weeks and have made many changes and many commits. I am ready to merge changes into MoreStableBranch, but I may not want to merge all changes, and I can't remember every change that has been committed on UnstableBranch. Before I submit a PR, I want to review all changes made to UnstableBranch so I can keep the ones I want and not merge the ones I don't.

At the command line I can do this with git diff MoreStableBranch but I want to review the changes using Vscode's side-by-side UI. I tried adding this to my .gitconfig:

[diff]
    tool = vscode
[difftool "vscode"]
    cmd = code --wait --diff $LOCAL $REMOTE

And then when I run git difftool MoreStableBranch from the integrated SSH terminal within Vscode, I am prompted to open the files one-by-one. This works, but I would love to see the whole directory, as you can in the source control panel for uncommitted changes. I tried using the --diff-dir option for difftool but get an error: At least one file must be provided to wait for.

So from a remote machine, how can I pull up in Vscode all the differences between my current working directory (UnstableBranch) and a different branch (MoreStableBranch)?

Also, my Git version is 1.8.3.1 and I don't have permission to update it.

Share Improve this question asked Mar 3 at 18:19 thehumaneraserthehumaneraser 6204 silver badges21 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

It looks like VScode doesn't support directory diff, and does not plan to: see issue #98197.

You will either have to test for extensions that claim to do so, or get imaginative using options for --diff ....

发布评论

评论列表(0)

  1. 暂无评论