git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: push fail

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Mar 17, 2014, 13:36 UTC
Message-ID
<vpq38ih7xrv.fsf@anie.imag.fr>
In-Reply-To
<CAH_OBie+KrSjtqLinbv8sJAOCu26j8xVzBQJHdHTB44V07GsXg@mail.gmail.com>
shawn wilson <ag4ve.us@gmail.com> writes:
Show 6 quoted lines
> How do I get more info here (and hopefully resolve this)?
>
>  % git push
> To ssh://server/foo/repo.git
>  ! [rejected]        test -> test (non-fast-forward)
> error: failed to push some refs to 'ssh://server/foo/repo.git'

You probably have a configuration that disables advices (look in ~/.gitconfig for an [advice] section. If you're a beginner, you probably shouldn't deactivate these advices).

Git normally says something like this:
To /tmp/git
 ! [rejected]        branch3 -> branch3 (non-fast-forward)
error: failed to push some refs to '/tmp/git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
The latest version says this which you may find clearer:
To /tmp/git
 ! [rejected]        branch3 -> branch3 (fetch first)
error: failed to push some refs to '/tmp/git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: shawn wilson
Message 4 of 4 in “push fail”
  1. shawn wilsonMar 17, 2014
  2. Dragos FoianuMar 17, 2014
  3. shawn wilsonMar 18, 2014
  4. Matthieu MoyMar 17, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.