From: "Shawn O. Pearce" <spearce@spearce.org>
To: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Cc: Steffen Prohaska <prohaska@zib.de>, git <git@vger.kernel.org>
Subject: Re: git push bug?
Date: Thu, 18 Oct 2007 20:49:26 -0400 [thread overview]
Message-ID: <20071019004926.GR14735@spearce.org> (raw)
In-Reply-To: <1192723847.9433.25.camel@gentoo-jocke.transmode.se>
Joakim Tjernlund <joakim.tjernlund@transmode.se> wrote:
> BTW this does not work either:
>
> git reset --hard HEAD^
> git push -f ssh://devsrv/var/git/os2kernel.git +master:master
> updating 'refs/heads/master'
> from 9c344d18d01221c8f25080cb58910e6b09efbf55
> to 5761a9e5924b34615c748fba2dcb977ed04c1243
> Generating pack...
> Done counting 0 objects.
> Writing 0 objects...
> Total 0 (delta 0), reused 0 (delta 0)
> error: denying non-fast forward refs/heads/master (you should pull first)
> ng refs/heads/master non-fast forward
> error: failed to push to 'ssh://devsrv/var/git/os2kernel.git'
>
> I thought the + in +master:master and the -f option should let me
> do that.
Yes, but its only on the client side.
See when we do a push the local client side determines if the push is
going to be a fast-forward or not. If it isn't then the git-push
client aborts before it even uploads data to the remote side.
The --force or + can be used to make the client side skip this
check and just plow forward anyway.
But the remote side can also veto a non-fast-forward update. By
default it refuses to allow such updates as they can orphan commits
(and thus potentially lose important work). See the config option
receive.denyNonFastForwards; you may want to set this to true in
the remote side's config file.
--
Shawn.
next prev parent reply other threads:[~2007-10-19 0:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-18 14:50 git push bug? Joakim Tjernlund
2007-10-18 15:14 ` Steffen Prohaska
2007-10-18 16:01 ` Joakim Tjernlund
2007-10-18 16:10 ` Joakim Tjernlund
2007-10-19 0:49 ` Shawn O. Pearce [this message]
2007-10-18 16:13 ` Steffen Prohaska
2007-10-18 16:21 ` Johannes Schindelin
2007-10-18 16:31 ` Joakim Tjernlund
2007-10-18 22:00 ` Johannes Schindelin
2007-10-19 14:47 ` Joakim Tjernlund
2007-10-19 17:24 ` Johannes Schindelin
2007-10-19 18:50 ` Joakim Tjernlund
2007-10-19 22:46 ` Johannes Schindelin
2007-10-20 12:05 ` Jan Hudec
2007-10-18 16:55 ` Steffen Prohaska
2007-10-18 21:58 ` Johannes Schindelin
2007-10-20 8:29 ` Steffen Prohaska
2007-10-20 8:38 ` Steffen Prohaska
2007-10-20 11:52 ` Joakim Tjernlund
2007-10-19 0:24 ` Shawn O. Pearce
2007-10-20 17:38 ` Joakim Tjernlund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071019004926.GR14735@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=joakim.tjernlund@transmode.se \
--cc=prohaska@zib.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.