11

I'm just getting started with GitHub and I'm trying to follow these instructions: https://help.github.com/articles/set-up-git

I've downloaded GitBash but when I click on it, the window pops up for a split second and then disappears again. I've tried not using the shortcut, and uninstall/reinstall, but neither helped, and I don't know enough about it to do any additional troubleshooting.

Even if you don't have a solution, some google search terms would be great - I don't know if there's a specific name for this kind of a problem.

Thank you!

Jonathan Leffler
  • 666,971
  • 126
  • 813
  • 1,185
Deidre
  • 123
  • 1
  • 1
  • 5

8 Answers8

15

I had the same problem. (Git Bash.vbs used to show for a split second and vanish)

In my case when I tried to run the Git.exe command from command prompt (by first navigating to the C:\Program Files (x86)\Git\bin), it gave me the following error:

couldn't reserve space for cygwin's heap win32 error 0

After running the following command my issue was resolved and Git Bash.vbs also started working properly:

C:\Program Files (x86)\Git\bin>rebase.exe -b 0x50000000 msys-1.0.dll

For more details refer the second answer of this question.

Edit: The problem and solution described above might not exactly be same for GitHub but should be similar.

Community
  • 1
  • 1
atif93
  • 391
  • 3
  • 8
2

I was having a similar problem, and I ended up running Git Bash "as administrator" and that is what fixed it for me.

EDIT: Requiring git bash to run as admin every time breaks git gui. If you don't use git gui, don't worry about this, but I just spent a few hours trying to figure out why my git gui was crashing and I couldn't push my changes upstream. While, running as administrator fixed the issue of my git bash crashing, I don't think it's a suitable long term solution.

MARS
  • 101
  • 9
1

You may want to check the path you are following. Later versions of Git have the version number as a level in the file path, and this is not reflected in the default shortcut.

Ronald
  • 11
  • 1
1

For me, the issue was solved by removing the line "Term=xterm-256color" from my .minttyrc file in home directory.

xiaogz
  • 11
  • 2
0

This is the gitBash script: a vbs script.

So you can try and call it from a DOS session:

C:\> cd C:\prog\git\PortableGit-1.8.0-preview20121022
C:\prog\git\PortableGit-1.8.0-preview20121022>"Git Bash.vbs"

You will see if there are any error message when calling that bash windows.

VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283
  • Thanks for your help. I did what you said, and there was no error message. The Git Bash window closed immediately just like before. – Deidre Apr 27 '13 at 15:56
0

I had the same problem (Git Bash would show up for a split second and then quit). I tried opening Git GUI, and was told that there were loose objects and asked if I wanted to compress the database. I clicked yes and quit Git Gui, reopened Git Bash, and Git Bash began working normally again.

Chatham
  • 101
0

I was having this problem when trying to open git bash from the start menu. Windows was not finding the program Git Bash, but was instead showing me "git bash" as a command I could run. (Windows is dumb.) Since bash is not a git command, the screen flashed possible git commands before closing.

The fix is to find the program Git Bash (identifiable by the orange-diamond-ish icon) and be sure to run that instead.

0

For me the problem was a missing global profile. I created an empty file located at "C:\Program Files\Git\usr\local\etc\profile.global" and the issue went away.

Jonathan
  • 634
  • 1
  • 5
  • 12