3

I'm learning how to use git by reading this book. However, when I tried to run the git log command, I got the following error message :

5 [main] less 3928 cygwin_exception::open_stackdumpfile: Dumping stack trace to less.exe.stackdump

The numbers 5 and 3928 change every time I try running the command. I'm using the version 2.1.14.1 of Git (64bits) on Windows 10 and I'm executing the command from a cmd console (same problem arises when using PowerShell or Git cmd).

Note : the command git diff generates the same error message.

To try out the log command, I've simply edited a "mytestfile.txt" and added two lines of random text, then I've commited by running the command git commit -a -m my "first commit". And then I tried running the log command with no success.

2
  • have you tried from mintty ? Commented Sep 19, 2017 at 14:46
  • Same error:( I will try to de-install and re-install git see if it solves the problem Commented Sep 20, 2017 at 6:38

4 Answers 4

2

Try setting your TERM variable to xterm or xterm-256color. If you want to leave TERM how you have it now, try aliasing git to TERM=xterm-256color git. This fixed it for me with Git 2.16.1 on Windows 7, 64 bit

Sign up to request clarification or add additional context in comments.

1 Comment

Setting the Terminal->Type to "xterm-256color" solved the issue for me.
1

I assume your commit has been made successfully and pushed into the server(?). Then you should be in the project's directory to run the git log command.

Note: When you use git commit with -m the message should be within double quotes.

2 Comments

The commit has been made successfully but not pushed (I've just tried pushing it (it was succesful) but same log error happens…Even though I think, from what I've understood so far, that pushing is not required in order to see the logs). I'm in the project directory when running the command. Indeed. in my shell, I wrote the commit command with a message within quotation marks. Just forgot to append them here, will edit my question. So yeah, the error's still there…
I'd suggest to revert the commit and do it again. (git reset --hard <branchNameHere>) If it doesnt work too, I'm afraid I cannot help with your problem :/
0

I faced this issue in windows and found that in my system path there are reference to two directories which contains git.exe file. Like

c:\progra~1\Git\cmd

c:\progra~1\Git\mingw64\bin

I think git by default uses the git.exe which is under Mingw64 directory. So from the system path I removed c:\progra~1\Git\cmd.

Now the git log works just fine as before.

1 Comment

Just to update : How did I find there there are two git.exe ? I did > whereis git and it showed two git references. From there I caught.
0

None of the answers helped me. My workaround was to run git inside a Docker container so that I could run the commands I wanted to run.

FROM ubuntu:20.04
RUN apt-get update -y && apt-get install -y git vim && git config --global user.name 'My Name Here' && git config --global user.email '[email protected]' && git config --global core.autocrlf false
$ docker build . -t my-temp-git-container:latest
$ docker run --rm -it -v "/$(pwd)"://mapped -w //mapped my-temp-git-container bash
# git commit --amend

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.