I decided to use git rebase -i HEAD~3 to merge the three commits, but I got the following error (below). Help solve this problem.

$ git rebase -i HEAD ~ 3

/ mingw64 / libexec / git-core / git-rebase - interactive: eval: line 255: syntax error near unexpected token '('

/ mingw64 / libexec / git-core / git-rebase - interactive: eval: line 255: 'C: / Program Files (x86) / Microsoft Visual Studio 14.0 / Common7 / IDE / devenv.exe "$ @"'

Additional Information:

I use GitExtensions as a wrapper for working with git and tied vsdiffmerge as a merge tool to this case.

I do not know why, but the message indicates the installation path of Visual Studio. Visual Studio Version: 2015 Update 3.

  • Try double-checking your .gitconfig for errors, quotes, slashes, etc. khokhlin.ru/2014/04/git-extensions-syntax-error-near.html - a.chugunov
  • @ a.chugunov, .gitconfig - absent. - vmp1r3
  • Make visible hidden files see the directory of the user or your repository to find gitconfig - a.chugunov

1 answer 1

It’s like an error somewhere in the git application itself. Instead of git rebase -i, you can do this:

 git reset --soft HEAD~3. # ΡƒΠΊΠ°Π·Π°Ρ‚Π΅Π»ΡŒ HEAD пСрСставляСтся Π½Π° Ρ‚Ρ€ΠΈ ΠΊΠΎΠΌΠΌΠΈΡ‚Π° Π½Π°Π·Π°Π΄ # измСнСния ΠΈΠ· этих ΠΊΠΎΠΌΠΌΠΈΡ‚ΠΎΠ² ΠΎΡΡ‚Π°Π»ΠΈΡΡŒ ΠΈ ΡƒΠΆΠ΅ проиндСксированы (Π΄ΠΎΠ±Π°Π²Π»Π΅Π½Ρ‹) # ΠΌΠΎΠΆΠ½ΠΎ Π΄Π΅Π»Π°Ρ‚ΡŒ ΠΊΠΎΠΌΠΌΠΈΡ‚: git commit # пишСм сообщСниС Π½ΠΎΠ²ΠΎΠ³ΠΎ ΠΊΠΎΠΌΠΌΠΈΡ‚Π°