1

Team, While I tried to push the code to the git, I am getting the following strange error. I could not get rid of this.

error: cannot spawnerror: cannot spawn sh: No such file or directory
fatal: unable to fork

I tried doing the following and got the same above error:

git push origin master // Tried pushing to the branch
git checkout -b vettal // Tried creating a new branch and then push
git push origin master -f
git push origin master --force 

Neither of the above commands worked

Do anyone have a solution for this?

Deepak Keynes
  • 2,291
  • 5
  • 27
  • 56

1 Answers1

1

I did the following steps and it worked:

  1. I deleted the .git folder
  2. I uninstalled the git from c:/program files
  3. I Uninstalled git bash too
  4. Installed the git and git bash now
  5. Initialized git

I checked using the following commands and it worked:

git checkout -b vettal // created a new branch 
git push origin vettal // and then made a push

Thanks for all the help made through various questions in stackoverflow!

Deepak Keynes
  • 2,291
  • 5
  • 27
  • 56