Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Erro na hora do "pull"

Aparece um erro na hora do pull de que o repositorio nao existe, meu codigo>

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
        new file:   index.html

git
Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/thiago (master)
$ git commit -m "vamo que vamo"
[master (root-commit) 6b2f401] vamo que vamo
 1 file changed, 37 insertions(+)
 create mode 100644 index.html

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/thiago (master)
$ cd ..
git
Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop (master)
$ mkdir serv

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop (master)
$ cd serv

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/serv (master)
$ git init --bare
Initialized empty Git repository in C:/Users/Usuario/Desktop/serv/

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/serv (BARE:master)
$ cd ..
cd
Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop (master)
$ cd thiago\
> cd thiago
bash: cd: too many arguments

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop (master)
$ cd thiago

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/thiago (master)
$ git remote add local C:/Users/Usuario/Desktop/serv/ projeto
usage: git remote add [<options>] <name> <url>

    -f, --fetch           fetch the remote branches
    --tags                import all tags and associated objects when fetching
                          or do not fetch any tag at all (--no-tags)
    -t, --track <branch>  branch(es) to track
    -m, --master <branch>
                          master branch
    --mirror[=(push|fetch)]
                          set up remote as a mirror to push to or fetch from


Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/thiago (master)
$ git remote

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/thiago (master)
$ git remote add local C:/Users/Usuario/Desktop/serv/

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/thiago (master)
$ git remote
local

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/thiago (master)
$ cd ..
m
Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop (master)
$ mkdir laura

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop (master)
$ cd laura

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/laura (master)
$ git clone C:/Users/Usuario/Desktop/serv/
Cloning into 'serv'...
warning: You appear to have cloned an empty repository.
done.

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/laura (master)
$ git clone C:/Users/Usuario/Desktop/serv/ projeto
Cloning into 'projeto'...
warning: You appear to have cloned an empty repository.
done.

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/laura (master)
$ cd ..

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop (master)
$ cd thiago

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/thiago (master)
$ git push local master
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 580 bytes | 580.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
To C:/Users/Usuario/Desktop/serv/
 * [new branch]      master -> master

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/thiago (master)
$ cd ..

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop (master)
$ cd laura

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/laura (master)
$ git remote
local

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/laura (master)
$ git pull local master
fatal: 'C/Users/Usuario/desktop/serv' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Usuario@DESKTOP-GCG2OAQ MINGW64 ~/desktop/laura (master)
$
3 respostas
solução!

Olá, Thiago. Tudo bem?

Parece que você não adicionou o repositório remoto C:/Users/Usuario/Desktop/serv/ no diretório ~/desktop/laura. Você até executou o git remote e apareceu o local pra você, mas você precisa explicitamente definir qual o endereço do repositório igual você fez no ~/desktop/thiago, pois esse local foi posto aí automáticamente.

O comando git remote -v vai te mostrar qual o endereço de cada repositório remoto registrado. Acredito que quando fizer isso no ~/desktop/laura, nenhum endereço deve aparecer.

Espero ter ajudado. Se tiver alguma dúvida, é só dizer.

Muito obrigado cara

Por nada, Thiago!

Se precisar, estamos aqui.