Link Search Menu Expand Document

Troubleshooting


SymptomsProbable causeAction
Get the git: command not found messageThe PATH environment is not set properly???
Get the fatal: not a git repository messageYou are not in the correct folderGo to the root folder using the cd command
 You forgot to initialize your folder as a git repositoryGo to the root folder and use the git init command
Get the error: failed to push error when pushingThe remote repository is in newer version than your local repositoryUse the git pull command to get the latest version, then use the git merge command to merge. After that, stage, commit and push again
Get the git: 'add.' is not a git command message when stagingYou forgot the space between ‘add’ and ‘.’Put the correct command git add .
Get the fatal: The upstream branch of your current branch does not match messageYou input a wrong branch name when you initialized your git repositoryUse the git branch -m command again and input the correct branch name