Pratik Vyavahare
Pratik Vyavahare

Reputation: 61

How to open git bash from specific folder in windows 11

In window 11 when we right click shows different options from windows 10. In windows 10 there is short cut to open current folder in a git bast. So what is short cut to open current folder in git bash in windows 11.

Upvotes: 3

Views: 23312

Answers (5)

FocusedWolf
FocusedWolf

Reputation: 1122

  1. Start > Terminal.

  2. ⌵ > Settings.

  3. Click "+ Add a new profile".

  4. Click "+ New empty profile".

     Name: Git Bash
    
     SOURCE: https://stackoverflow.com/a/56867460/490748
     SOURCE: https://www.gnu.org/software/bash/manual/bash.html#Invoking-Bash
     -i    Force the shell to run interactively.
     -l    Make this shell act as if it had been directly invoked by login.
    
     Command line: C:\Program Files\Git\bin\bash.exe -i -l
    
     Starting directory:
         [x] Use parent process directory
    
     Icon: C:\Program Files\Git\git-bash.exe
    
  5. Click "Save".

  6. Click "+ New empty profile".

  7. Select Duplicate a profile: [Git Bash]

  8. Click "Duplicate".

     Name: Git Bash (Run as administrator)
    
     Run this profile as Administrator: [On]
    
  9. Click "Save".

Upvotes: 1

Vyacheslav
Vyacheslav

Reputation: 193

  1. Navigate to the folder you want to open in Git Bash. enter image description here

  2. Navigate inside the I_Want_To_Open_This_Folder_in_Git_Bash folder and "right-click" with your mouse, choose "Show more options".enter image description here

  3. Choose "Git Bash Here".enter image description here

  4. Ready. Smash that up-like button if you liked the answer. enter image description here

Upvotes: 9

AliFraz
AliFraz

Reputation: 11

Just three simple steps...

  1. Right-click on your required folder.
  2. Select Show more options
  3. Click on Git Bash Here

Upvotes: 1

jaiswal vinay
jaiswal vinay

Reputation: 91

open the command prompt anywhere using right click option.

Right click from mouse

and use given "Down arrow" in cmd prompt.

cmd prompt option with down arrow symbol

Choose setting setting

Add new profile use add new profile button

in command line browse git/git-bash.exe location and add it. browse and add location of git bash

.....Using the same down arrow, you can open git.

Upvotes: 9

Michael DeMarco
Michael DeMarco

Reputation: 41

What I've found, laid out in this video by Code Astra here, is that Windows 11 offers a drop down to select the terminal profile of your choice, once you have selected Right Click --> Open in Terminal.

Once you have the Terminal open, select the drop down to the right of the Terminal tab. Here you can select your desired Terminal Profile. If your Git Bash Profile is not found here, select Settings.

Git Bash Terminal Settings

In the settings menu, you can choose your default Terminal profile, application, and decide on other various options.

Git Bash Terminal Settings 2

Navigate on the left pane to "Add a new profile," and then under Add a new profile, select "+ New empty profile"

Fill the form. Name it Git Bash, then naviagte tot he "Program Files" directory where the git-bash.exe is found, most likely "C:\Program Files\Git\git-bash.exe" and choose the starting directory.

Now when you right click, Windows will open Git Bash.

I hope this was helpful!

Upvotes: 4

Related Questions