vscode 에서 터미널 옵션 gitbash 안뜨는거 해결하기

LJM·2022년 12월 14일
0

vscode

목록 보기
1/1
post-thumbnail

visual studio code 에서 터미널을 열고 gitbash 를 선택하고 싶었는데 안되서 해결방법을 찾아서 해결하였다. 정리목적으로 올린다.

내 사용환경은 윈도우11 이다.

우선 vscode 에서 상단 검색창에

settings.json 입력해서 열자

그리고 다음과 같이 변경하자

{
"workbench.colorTheme": "Default Dark+",
"files.autoSave": "afterDelay",
"json.schemas": [
],

"terminal.integrated.profiles.windows": {
    "PowerShell": {
      "source": "PowerShell",
      "icon": "terminal-powershell"
    },
    "Command Prompt": {
      "path": [
        "${env:windir}\\Sysnative\\cmd.exe",
        "${env:windir}\\System32\\cmd.exe"
      ],
      "args": [],
      "icon": "terminal-cmd"
    },
    "GitBash": {
        "path": ["D:\\Program Files\\Git\\bin\\bash.exe"],
        "args": []
      }
  },
"terminal.integrated.defaultProfile.windows": "GitBash"

}

',' 콤마 찍는거 중요하다. 안하면 제이슨 문법 오류난다

path 에 경로는 bash.exe 파일이 있는곳으로 바꾸자

완료하였다면 visual studio code를 끄고 다시 실행하자

ctrl + ~ 키를 눌러서 터미널을 열자

성공하면 다음과 같이 gitbash 를 선택할 수 있다

출처: https://stackoverflow.com/questions/68068359/gitbash-not-showing-up-as-a-terminal-option-in-visual-studio-code

profile
게임개발자 백엔드개발자

0개의 댓글