All of lore.kernel.org
 help / color / mirror / Atom feed
* push fail
@ 2014-03-17 13:06 shawn wilson
  2014-03-17 13:34 ` Dragos Foianu
  2014-03-17 13:36 ` Matthieu Moy
  0 siblings, 2 replies; 4+ messages in thread
From: shawn wilson @ 2014-03-17 13:06 UTC (permalink / raw)
  To: Git List

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'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: push fail
  2014-03-17 13:06 push fail shawn wilson
@ 2014-03-17 13:34 ` Dragos Foianu
  2014-03-18  1:58   ` shawn wilson
  2014-03-17 13:36 ` Matthieu Moy
  1 sibling, 1 reply; 4+ messages in thread
From: Dragos Foianu @ 2014-03-17 13:34 UTC (permalink / raw)
  To: git

shawn wilson <ag4ve.us <at> gmail.com> writes:

> 
> 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'
> 

"non-fast-forward" means that someone else pushed to branch test before you
did and your push would end up overwriting their changes. Make sure you
merge your local branch with the remote branch:

git pull origin test

It might also be a result of local destructive changes made by "git rebase".
If you're absolutely certain you will not mess up the remote branch you can
add the "--force" parameter when you push.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: push fail
  2014-03-17 13:06 push fail shawn wilson
  2014-03-17 13:34 ` Dragos Foianu
@ 2014-03-17 13:36 ` Matthieu Moy
  1 sibling, 0 replies; 4+ messages in thread
From: Matthieu Moy @ 2014-03-17 13:36 UTC (permalink / raw)
  To: shawn wilson; +Cc: Git List

shawn wilson <ag4ve.us@gmail.com> writes:

> 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: push fail
  2014-03-17 13:34 ` Dragos Foianu
@ 2014-03-18  1:58   ` shawn wilson
  0 siblings, 0 replies; 4+ messages in thread
From: shawn wilson @ 2014-03-18  1:58 UTC (permalink / raw)
  To: Dragos Foianu; +Cc: Git List

Thanks.

Yeah, I should've thought to do a pull....

On Mon, Mar 17, 2014 at 9:34 AM, Dragos Foianu <dragos.foianu@gmail.com> wrote:
> shawn wilson <ag4ve.us <at> gmail.com> writes:
>
>>
>> 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'
>>
>
> "non-fast-forward" means that someone else pushed to branch test before you
> did and your push would end up overwriting their changes. Make sure you
> merge your local branch with the remote branch:
>
> git pull origin test
>
> It might also be a result of local destructive changes made by "git rebase".
> If you're absolutely certain you will not mess up the remote branch you can
> add the "--force" parameter when you push.
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-03-18  1:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-17 13:06 push fail shawn wilson
2014-03-17 13:34 ` Dragos Foianu
2014-03-18  1:58   ` shawn wilson
2014-03-17 13:36 ` Matthieu Moy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.