Difference between revisions of "Git push -v"

From wikieduonline
Jump to navigation Jump to search
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 +
* <code>[[git push]] -v</code>
 +
* <code>[[GIT_SSH_COMMAND]]="ssh -v" [[GIT_TRACE]]=1 git push -vvv -u origin main</code>
 +
 +
 +
[[git push]] -v
 +
[[fatal: You are not currently on a branch]].
 +
To push the history leading to the current ([[detached]] HEAD)
 +
state now, use
 +
    [[git push origin]] HEAD:<name-of-remote-branch>
 +
 +
 +
How to commit to [[remote branch]]:
 +
{{git push origin OUTPUT}}
 +
 +
Error if you omit [[HEAD]]:
 +
[[git push origin]] name-of-remote-branch
 +
error: src [[refspec]] name-of-remote-branch does not match any
 +
error: failed to push some refs to 'gitlab.com:project/app.git'
 +
 +
 +
[[git status]]
 +
[[HEAD]] detached from origin/your-branch-name
 +
[[nothing to commit, working tree clean]]
  
[[git pull -v]]
 
  
 
== Related ==
 
== Related ==
[[GIT_SSH_COMMAND]]="ssh -v"
+
* <code>[[git pull -v]]</code>
 +
* <code>[[GIT_SSH_COMMAND]]="ssh -v"</code>
 +
* <code>[[git status]]</code>
 +
* <code>[[git remote -v]]</code>
  
 
== See also ==
 
== See also ==
 
* {{git push}}
 
* {{git push}}
* {{git}}
 
  
 
[[Category:Git]]
 
[[Category:Git]]

Latest revision as of 09:38, 16 November 2022


git push -v
fatal: You are not currently on a branch.
To push the history leading to the current (detached HEAD)
state now, use 
   git push origin HEAD:<name-of-remote-branch>


How to commit to remote branch:

git push origin HEAD:your-name-of-remote-branch
Enumerating objects: 21, done.
Counting objects: 100% (21/21), done.
Delta compression using up to 8 threads
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 5.48 KiB | 801.00 KiB/s, done.
Total 11 (delta 9), reused 0 (delta 0), pack-reused 0
remote:
remote: View merge request for your-name-of-remote-branch:
remote:   https://gitlab.com/your-project/your-app/-/merge_requests/2913
remote:
To gitlab.com:your-project/your-app.git
   7caef6a60..f942d7435  HEAD -> your-name-of-remote-branch

Error if you omit HEAD:

git push origin name-of-remote-branch
error: src refspec name-of-remote-branch does not match any
error: failed to push some refs to 'gitlab.com:project/app.git'


git status
HEAD detached from origin/your-branch-name
nothing to commit, working tree clean


Related[edit]

See also[edit]

Advertising: