Error message |
fatal: not a git repository (or any of the parent directories): .git |
You are not in the directory of your local repository |
Set your terminals working directory to the directory of your local repository |
Error message |
bash: git: command not found |
Git is not installed. |
Install Git via the instructions provided at https://git-scm.com/book/en/v2/Getting-Started-Installing-Git |
Error message |
error: failed to push some refs to 'remote' |
Your local repository has changes that conflict with the changes in the remote repository. |
Pull the latest changes from the remote repository using git pull and resolve any merge conflicts before pushing again. |
|
|
You do not have permission to push to the remote repository. |
Request permission from the repository owner |
Error message |
error: Your local changes to the following files would be overwritten by merge |
Your local changes do not match the changes in the branch you are trying to merge into. |
Commit your changes then try to merge again. |
Error message |
error: failed to clone some repository |
You do not have permission to access the remote repository or it is unavailable. |
Make sure the repository URL you copied is correct, and check that you have permission to access the repository. |
Repository Syncing |
Local repository says up to date, but new files have been added to GitHub |
The local repository is not properly synced with the remote repository. |
Use git fetch to update the local repository with changes in the remote repository. Then use git pull to pull new changes into your local repository |
|
|
Changes were made to a different branch than the one you are currently on. |
Use the git branch command to check if the changes were made in a different branch. If so, switch to that branch using the git checkout command and merge the changes into the current branch using the git merge command. |
Git Misuse |
Committed the wrong files to your Git repository |
— — — |
Use the command git reset to undo the last commit. |