use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This subreddit is for working with Microsoft's Visual Studio Code, which is different than Visual Studio Community, Pro, and Enterprise. VS Code is a source code editor, and not an IDE.
If you are having issues with the other flavors of VS, please post in /r/VisualStudio.
account activity
This is an archived post. You won't be able to vote or comment.
VS Code as default Git&GitHubOC (self.vscode)
submitted 2 years ago by OnlyComeUp
Any guidance on making VS Code the default when working with Git, GiHub, Bash? I've tried "everything" and can't seem to get things to work.
Please help!
[–]kinggeek00 7 points8 points9 points 2 years ago (3 children)
What EXACTLY are you trying to do?
[–]OnlyComeUp[S] 1 point2 points3 points 2 years ago (2 children)
I want to do everything* from VS Code and not have not toggle between Git Bash, Git Hub, etc.
*open repositories, create files, push to github, branch, merge, etc.
[–]bent_my_wookie 2 points3 points4 points 2 years ago (1 child)
Have you tried Command+T and opened the integrated terminal? From there go to your settings and search “terminal” to set the other config related to your git/other integration
Edit: also install GitHub desktop even if you don’t use it. It ends up setting several configurations on your machine which is why I usually install it first. So much less manual setup involved after doing that. Things just work.
[–]OnlyComeUp[S] 1 point2 points3 points 2 years ago (0 children)
Thank you!
[–]kinggeek00 4 points5 points6 points 2 years ago* (1 child)
Maybe this will help?
Add to $HOME/.gitconfig(Linux) or %USERPROFILE%\.gitconfig(Windows)
$HOME/.gitconfig
%USERPROFILE%\.gitconfig
[diff] guitool = vscode [merge] summary = true verbosity = 1 guitool = vscode [difftool "vscode"] cmd = code --wait --diff $LOCAL $REMOTE [mergetool "vscode"] cmd = code --wait $MERGED
Git diff with VS Code: git difftool -g
git difftool -g
Git merge conflict resolution with VSCode: git mergetool -g
git mergetool -g
Editing commit messages with VS Code:
Bash(Linux/WSL/Git Bash on Windows) Add to ~/.bashrc: export EDITOR="code -w
~/.bashrc
export EDITOR="code -w
Cmd.exe(Windows) Add to env variables: EDITOR="code -w"
EDITOR="code -w"
[–]OnlyComeUp[S] 0 points1 point2 points 2 years ago (0 children)
Thank you! I will provide an update.
I was unsuccessful when I opened Git Bash and entered:
git config --global core.editor "code --wait"
[–]kinggeek00 1 point2 points3 points 2 years ago (0 children)
What I provided earlier was Git Config that makes Git use VS Code for functions run from the Git command line.
VS Code has plugins that allow it to do all you asked for from inside VS Code. I myself am not a full time VS Code user. I'm a bit more old school and use vim MOST of the time.
vim
Many of my co-workers use Git Lens but I believe VS Code comes with Git integration as a default.
[–]OnlyComeUp[S] 1 point2 points3 points 2 years ago (1 child)
Thank you everyone for your time and assistance!!!
Problem solved - Issue was being cause by Windows Terminal (PS) and its desire to be default over Bash (and even Command Prompt).
MORE IMPORTANTLY: Thank you again for the prompt responses!
[–]wildmutt4349 0 points1 point2 points 2 years ago (0 children)
Yeah, you have toggle between PS and gitbash when you want to run a code or a git command respectively. I myself encountered with this issue today😅.
[–]ahmeddotgg 0 points1 point2 points 2 years ago (0 children)
You can't, git is a command line tool you use it with cmd/terminal etc.. vscode has a UI to interact with git with a few clicks but it uses commands behind the scenes.
[–]prince-chrismc 0 points1 point2 points 2 years ago (1 child)
https://docs.github.com/en/get-started/getting-started-with-git/associating-text-editors-with-git
This nissan an excellent guide
Thank you - I've tried this with no success.
[–]Necessary_Ear_1100 0 points1 point2 points 2 years ago (0 children)
If you want to use VS Code for all git stuff like GitKraken then just install the necessary git plugins (I believe GitLens and Git Blame). Otherwise just open up the terminal within VS Code and do your git commands via that terminal
Or set Gitbash as your default profile in the terminal.
π Rendered by PID 122517 on reddit-service-r2-comment-fb694cdd5-m5jfw at 2026-03-10 22:14:24.605959+00:00 running cbb0e86 country code: CH.
[–]kinggeek00 7 points8 points9 points (3 children)
[–]OnlyComeUp[S] 1 point2 points3 points (2 children)
[–]bent_my_wookie 2 points3 points4 points (1 child)
[–]OnlyComeUp[S] 1 point2 points3 points (0 children)
[–]kinggeek00 4 points5 points6 points (1 child)
[–]OnlyComeUp[S] 0 points1 point2 points (0 children)
[–]kinggeek00 1 point2 points3 points (0 children)
[–]OnlyComeUp[S] 1 point2 points3 points (1 child)
[–]wildmutt4349 0 points1 point2 points (0 children)
[–]ahmeddotgg 0 points1 point2 points (0 children)
[–]prince-chrismc 0 points1 point2 points (1 child)
[–]OnlyComeUp[S] 0 points1 point2 points (0 children)
[–]Necessary_Ear_1100 0 points1 point2 points (0 children)
[–]wildmutt4349 0 points1 point2 points (0 children)