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

"git remote add local" não funciona

Olá, Não estou consiguindo passar do passo "5) Execute o comando git remote add local {caminho}. Substitua {caminho} pelo caminho completo da pasta recém criada;".

evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github/ex (master)
$ cd ..

evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github
$ mkdir servidor

evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github
$ cd servidor/

evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github/servidor
$ git init --bare
Initialized empty Git repository in C:/Users/evani/OneDrive/Área de Trabalho/lógica/Git-Github/servidor/

evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github/servidor (BARE:master)
$ cd ../ex/

evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github/ex (master)
$ git remote

evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github/ex (master)
$ git remote add local C:/Users/evani/OneDrive/Área de Trabalho/lógica/Git-Github/servidor/
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


evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github/ex (master)
$ cd ..

evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github
$ mkdir ana

evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github
$ cd ..ana/
bash: cd: ..ana/: No such file or directory

evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github
$ cd ana/

evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github/ana
$ git clone C:/Users/evani/OneDrive/Área de Trabalho/lógica/Git-Github/servidor/ projeto
fatal: Too many arguments.

usage: git clone [<options>] [--] <repo> [<dir>]

    -v, --verbose         be more verbose
    -q, --quiet           be more quiet
    --progress            force progress reporting
    -n, --no-checkout     don't create a checkout
    --bare                create a bare repository
    --mirror              create a mirror repository (implies bare)
    -l, --local           to clone from a local repository
    --no-hardlinks        don't use local hardlinks, always copy
    -s, --shared          setup as shared repository
    --recurse-submodules[=<pathspec>]
                          initialize submodules in the clone
    --recursive ...       alias of --recurse-submodules
    -j, --jobs <n>        number of submodules cloned in parallel
    --template <template-directory>
                          directory from which templates will be used
    --reference <repo>    reference repository
    --reference-if-able <repo>
                          reference repository
    --dissociate          use --reference only while cloning
    -o, --origin <name>   use <name> instead of 'origin' to track upstream
    -b, --branch <branch>
                          checkout <branch> instead of the remote's HEAD
    -u, --upload-pack <path>
                          path to git-upload-pack on the remote
    --depth <depth>       create a shallow clone of that depth
    --shallow-since <time>
                          create a shallow clone since a specific time
    --shallow-exclude <revision>
                          deepen history of shallow clone, excluding rev
    --single-branch       clone only one branch, HEAD or --branch
    --no-tags             don't clone any tags, and make later fetches not to follow them
    --shallow-submodules  any cloned submodules will be shallow
    --separate-git-dir <gitdir>
                          separate git dir from working tree
    -c, --config <key=value>
                          set config inside the new repository
    --server-option <server-specific>
                          option to transmit
    -4, --ipv4            use IPv4 addresses only
    -6, --ipv6            use IPv6 addresses only
    --filter <args>       object filtering
    --remote-submodules   any cloned submodules will use their remote-tracking branch
    --sparse              initialize sparse-checkout file to include only files at root


evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github/ana
$ ls

evani@DESKTOP-HVQCCJ6 MINGW64 ~/onedrive/Área de Trabalho/lógica/Git-Github/ana
$ cd projeto/
bash: cd: projeto/: No such file or directory
2 respostas
solução!

Bom dia, Evanio!

Provavelmente isso aconteceu devido ao uso de pasta com espaços no nome. Tente:

git remote add local C:/Users/evani/OneDrive/Área\ de\ Trabalho/lógica/Git-Github/servidor/

Bom dia, Felipe!

Tentei aqui, e funcionou. Ainda peco muito nesses detalhes.

Obrigado pela ajuda e a dica.