Skip to content

Instantly share code, notes, and snippets.

@shelooks16
Created September 7, 2021 20:56
Show Gist options
  • Save shelooks16/8f849adbd9c8617c9170fd5e38f87c3e to your computer and use it in GitHub Desktop.
Save shelooks16/8f849adbd9c8617c9170fd5e38f87c3e to your computer and use it in GitHub Desktop.
Vscode configuration
{
// security trust window, open = not shown
"security.workspace.trust.untrustedFiles": "open",
// configure git-bash (windows-only for git-bash users)
"terminal.integrated.profiles.windows": {
"Git Bash": {
"path": "C:\\Program Files\\Git\\bin\\bash.exe",
"args": ["-l", "-i"]
}
},
"terminal.integrated.defaultProfile.windows": "Git Bash",
// prettier
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
@shelooks16
Copy link
Author

@sameermehra123 Alright. Can you post the solution (what you did to resolve it) just in case? Would be pretty much appreciated!

@sameermehra123
Copy link

sameermehra123 commented Jun 22, 2022 via email

@shelooks16
Copy link
Author

Oh. I see what was the issue. It was enough to restart terminal instance, system restart is not required ;)

@sameermehra123
Copy link

sameermehra123 commented Jun 26, 2022 via email

@shelooks16
Copy link
Author

@sameermehra123 please contact the Internshala support team with this concern.

@NagaVeniii
Copy link

Using the mentioned code of this
// configure git-bash (windows-only for git-bash users) is follwed by this error
"Value is not accepted. Valid values: null, "PowerShell", "Windows PowerShell", "Command Prompt", "JavaScript Debug Terminal".

Also I tried setting "GitBash" instead of "Git Bash" and that didnt help either.

Please help me resolve this.

@shelooks16
Copy link
Author

@NagaVeniii

Hi, make sure git-bash is installed in the first place. Restart vscode.

Official docs and examples:
https://code.visualstudio.com/docs/terminal/profiles

Read a random tutorial for using git-bash:
https://dev.to/andrewriveradev/how-to-set-git-bash-as-integrated-terminal-in-vscode-2k31

Valid example:

  "terminal.integrated.profiles.windows": {
    "GitBash": {
      "path": "C:\\Program Files\\Git\\bin\\bash.exe",
      "args": ["-l", "-i"]
    }
  },
  "terminal.integrated.defaultProfile.windows": "GitBash

@sameermehra123
Copy link

sameermehra123 commented Oct 11, 2022 via email

@kisuu987
Copy link

Hello Sir
I have a problem in vs config
WhatsApp Image 2023-02-24 at 5 30 07 PM

@shelooks16
Copy link
Author

@kisuu987 Hey, try changing Git Bash on lines 14 and 19 to GitBash

@kisuu987
Copy link

Sir again it is showing value does not accept...
WhatsApp Image 2023-02-27 at 7 41 52 PM
WhatsApp Image 2023-02-27 at 7 41 52 PM

@kisuu987
Copy link

I also tried Git-Bash on 14 and 19 vice versa

@shelooks16
Copy link
Author

@kisuu987 change it on both lines at the same time

@kisuu987
Copy link

Sir I have tried GitBash/Git Bash
Git-Bash/Git-Bash
Git Bash/Git Bash
GitBash/GitBash
Git-Bash/Git Bash
but it is showing value not accepted

@shelooks16
Copy link
Author

@kisuu987 got it.

Try this video, it shows multiple ways to set 'git-bash' as a integrated shell:
https://youtu.be/PzJCwfYfIzY

@TheNemus
Copy link

@kisuu987 be sure the path of your git-bash.exe is right. VS Code accept the terminal instance only if it can actually find the .exe

@kisuu987
Copy link

kisuu987 commented Mar 20, 2023

@TheNemus and @shelooks16 sir I even reinstalled it and again tried but it was not work showing the same error and even it is showing git-bash version and all in cmd positively

@shelooks16
Copy link
Author

@kisuu987
have you tried watching video reference posted above? If nothing helps, to not stop at this point you can proceed further with Powershell/CMD as vscode integrated terminal. It's ok

@kisuu987
Copy link

@TheNemus and @shelooks16 I got it... Thankyou sir
"terminal.integrated.profiles.windows": {
"GitBash": {
"path": "E:\importantfiles\Git\bin\bash.exe",
"icon": "terminal-bash"
}
},
"terminal.integrated.defaultProfile.windows": "GitBash",
"git.enabled": true,
"git.path": "E:\importantfiles\Git\bin\bash.exe"

@DIKSHA52
Copy link

DIKSHA52 commented Jun 2, 2023

● settings json - testproject - Visual Studio Code 02-06-2023 18_39_47

@DIKSHA52
Copy link

DIKSHA52 commented Jun 2, 2023

error in esbenp

@shelooks16
Copy link
Author

@DIKSHA52

the command does not contain any dashes:

git init

@AjayNikam13
Copy link

be sure the path of your git-bash.exe is right. VS Code accept the terminal instance only if it can actually find the .exe

@AjayNikam13
Copy link

Screenshot (518)

@muskan-mohiuddin
Copy link

why it showing this
Screenshot (173)

@shelooks16
Copy link
Author

shelooks16 commented May 19, 2024

@muskan-mohiuddin
run the commands in the terminal the output suggests to configure Git

git config --global user.name "YOUR NAME"
git config --global user.email [email protected]

@muskan-mohiuddin
Copy link

why its showing this?

@muskan-mohiuddin
Copy link

sir how to config git?

@muskan-mohiuddin
Copy link

what to do ?

@shelooks16
Copy link
Author

@muskan-mohiuddin

Run the commands from my previous reply in the terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment