Olá mais uma vez a todos estou passando por um problema bem chato... e até o momento não consegui identificar.. sempre que tento dar push ou pull em meu projeto recebo as mensagens abaixo, e não sobe nada lá no github, por favor se alguém souber resolver por favor me ajude sou novo nesse negócio de git e estou bem perdido..., grato desde já por sua atenção:
obs: o código abaixo é um teste mais isso ocorre co outras pastas de projeto também..
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git add .
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git commit -m "subir novo projeto"
On branch master
nothing to commit, working tree clean
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git push branch master
fatal: 'branch' 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.
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git push origin master
To https://github.com/Gustavocgsg/RepositorioTeste.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/Gustavocgsg/RepositorioTeste.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git pull origin master
From https://github.com/Gustavocgsg/RepositorioTeste
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
fatal: refusing to merge unrelated histories
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git status
On branch master
nothing to commit, working tree clean
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git fetch
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git status
On branch master
nothing to commit, working tree clean
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git merge
fatal: No remote for the current branch.
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git remote https://github.com/Gustavocgsg/RepositorioTeste.git
error: Unknown subcommand: https://github.com/Gustavocgsg/RepositorioTeste.git
usage: git remote [-v | --verbose]
or: git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--mirror=<fetch|push>] <name> <url>
or: git remote rename <old> <new>
or: git remote remove <name>
or: git remote set-head <name> (-a | --auto | -d | --delete | <branch>)
or: git remote [-v | --verbose] show [-n] <name>
or: git remote prune [-n | --dry-run] <name>
or: git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]
or: git remote set-branches [--add] <name> <branch>...
or: git remote get-url [--push] [--all] <name>
or: git remote set-url [--push] <name> <newurl> [<oldurl>]
or: git remote set-url --add <name> <newurl>
or: git remote set-url --delete <name> <url>
-v, --verbose be verbose; must be placed before a subcommand
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git remote -v
RepositorioTeste https://github.com/Gustavocgsg/RepositorioTeste.git (fetch)
RepositorioTeste https://github.com/Gustavocgsg/RepositorioTeste.git (push)
origin https://github.com/Gustavocgsg/RepositorioTeste.git (fetch)
origin https://github.com/Gustavocgsg/RepositorioTeste.git (push)
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git remote RepositorioTeste
error: Unknown subcommand: RepositorioTeste
usage: git remote [-v | --verbose]
or: git remote add [-t <branch>] [-m <master>] [-f] [--tags | --no-tags] [--mirror=<fetch|push>] <name> <url>
or: git remote rename <old> <new>
or: git remote remove <name>
or: git remote set-head <name> (-a | --auto | -d | --delete | <branch>)
or: git remote [-v | --verbose] show [-n] <name>
or: git remote prune [-n | --dry-run] <name>
or: git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]
or: git remote set-branches [--add] <name> <branch>...
or: git remote get-url [--push] [--all] <name>
or: git remote set-url [--push] <name> <newurl> [<oldurl>]
or: git remote set-url --add <name> <newurl>
or: git remote set-url --delete <name> <url>
-v, --verbose be verbose; must be placed before a subcommand
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git clone https://github.com/Gustavocgsg/RepositorioTeste.git
Cloning into 'RepositorioTeste'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (3/3), done.
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git status
On branch master
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
deleted: index.html
Untracked files:
(use "git add <file>..." to include in what will be committed)
RepositorioTeste/
no changes added to commit (use "git add" and/or "git commit -a")
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git add .
warning: adding embedded git repository: RepositorioTeste
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> RepositorioTeste
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached RepositorioTeste
hint:
hint: See "git help submodule" for more information.
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git add .
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git commit -m "nova tentativa de subir arquivos"
[master 2b87106] nova tentativa de subir arquivos
2 files changed, 1 insertion(+)
create mode 160000 RepositorioTeste
rename index.html => index_v1.html (100%)
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git push
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$ git push origin master
To https://github.com/Gustavocgsg/RepositorioTeste.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/Gustavocgsg/RepositorioTeste.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
gusta@GUSTAVO-PC MINGW64 /c/RepositorioTeste (master)
$
git remote -v
e veja se tem um repositórioorigin
listado. Se não tiver, insira com este comandogit remote add origin