DEV Community

Farghly Ahmed
Farghly Ahmed

Posted on

Launch git from cmd for Windows users

In this post I will show how to launch git-bash from cmd
First add git path to environment variables

  • For x86
%SYSTEMDRIVE%\Program Files (x86)\Git\bin\
Enter fullscreen mode Exit fullscreen mode
  • For x64
%PROGRAMFILES%\Git\bin\
Enter fullscreen mode Exit fullscreen mode

After adding path to environment variables Open cmd and write this command to open git bash

sh --login
Enter fullscreen mode Exit fullscreen mode

OR

sh 
Enter fullscreen mode Exit fullscreen mode

OR

bash --login
Enter fullscreen mode Exit fullscreen mode

OR

bash
Enter fullscreen mode Exit fullscreen mode

You can see this GIF image for more details:
https://media1.giphy.com/media/WSxbZkPFY490wk3abN/giphy.gif
Resource link:https://stackoverflow.com/a/62366648/5661396

Top comments (0)