A seguir estão algumas séries de erros que encontrei com a linha de comando do git depois de não usar o xshell por um tempo e suas soluções
Encontrei este erro:
fatal: Não é um repositório git (ou qualquer um dos diretórios pai): .git
Consultei alguns blogs e informações, a forma de resolver:
git init
Quando enviei arquivos com git push, encontrei o seguinte erro
fatal: No configured push destination.
Either specify the URL from the command-line or configure a remote repository using
git remote add <name> <url>
and then push using the remote name
git push <name>
Solução:
git remote add origin 'http://git.....'
git push -u origin master
Este erro ocorreu:
Solução:
git pull --rebase origin master
Erro encontrado:
error: The following untracked working tree files would be overwritten by checkout
Solução:
git clean -d -fx
Erro encontrado:
** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'lvyp@NEU-20190128LYP.(none)')
Solução:
Isso significa que você não definiu o nome de usuário e a caixa de correio quando criou o armazém local . Neste momento, siga o prompt de erro e use
git config --global user.name "follow"
git config --global user.email "[email protected]"
mais uma frase
git config --local -l