“Git Bash here” isn't working when right clicking

前端 未结 6 505
甜味超标
甜味超标 2021-02-05 03:38

I dunno how that happened but before today I could right click on any folder and there would be and an option Git Bash here. But today I dont have that option. Anyo

相关标签:
6条回答
  • 2021-02-05 03:55

    Reinstall Git and select:

    Context menu entries: "Git Bash Here" (and the "Git GUI Here" option)
    

    During the installation. Can't say why it disappeared, but this should bring it back.

    0 讨论(0)
  • 2021-02-05 03:57
    1. Uninstall Git completely and delete the Git folder in program files.
    2. Install Git.
    3. From the Context menu, select "Git Bash" & "Git GUI here" options.
    0 讨论(0)
  • 2021-02-05 04:01

    HOW TO FIX WITHOUT RE-Installing:

    I got this problem after moving all my programs off of my main hard drive and pasting them into my "P" drive. But kept all of the directory structures the same.

    Git was moved from:
    C:\DEV\PROG\GIT
    TO:
    P:\DEV\PROG\GIT

    1: Open The Registry Editor: Type "regedit" in start menu search and hit enter.

    2: Find the context menu shortcut configuration for "git bash here" In regedit: Menu "Edit" > "Find" > "Find what" and enter "git_shell"

    3: Edit the Data value so that path points to the correct location. In my case I changed:

    "C:\DEV\PROG\GIT\git-bash.exe" "--cd=%v."
    TO:
    "P:\DEV\PROG\GIT\git-bash.exe" "--cd=%v."
    Screen shot included below.
    

    0 讨论(0)
  • 2021-02-05 04:02

    Steps if you can't use the reinstall metod.

    Use REGEDIT

    1/ Open regedit (search it if needed)
    2/ Go to 'HKEY_CURRENT_USER/Software/Classes/Directory/Background'
    3/ Create new key 'shell'
    4/ Create new key 'Git bash here' (or whatever name you want to see in the menu)
    5/ Create new key 'command' (must be named command)
    
    At this point point you'll have
    'HKEY_CURRENT_USER/Software/Directory/Background/shell/Git bash here/command'
    
    6/ Edit the value of the command key as follow 'pathToGit/git-bash.exe'
    

    Update or open new windows explorer and you'll see it when right clicking.

    Image to sum this up :

    0 讨论(0)
  • 2021-02-05 04:07

    Run this script (AddGitToExplorerContextMenu.reg). You may need to update the location of Git. You can add it manually through regedit also

    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell]
    @="Git Bash"
    
    [HKEY_CLASSES_ROOT\Directory\Background\shell\git_shell\command]
    @="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%v.\""
    
    0 讨论(0)
  • 2021-02-05 04:14

    I found what I was looking for was in the left pane, not in the right folder. And still using the right-click.

    0 讨论(0)
提交回复
热议问题