Re: [PATCH v2 06/15] user-manual: Give 'git push -f' as an alternative to +master
- From
W. Trevor King <wking@tremily.us>
- Date
- Feb 10, 2013, 22:04 UTC
- Message-ID
- <20130210220429.GE8000@odin.tremily.us>
- In-Reply-To
- <7vsj53sub1.fsf@alter.siamese.dyndns.org>
On Sun, Feb 10, 2013 at 02:00:50PM -0800, Junio C Hamano wrote:
Show 28 quoted lines
> "W. Trevor King" <wking@tremily.us> writes: > > +Note the addition of the `+` sign. Alternatively, you can use the > > +`-f` flag to force the remote update, as in: > > + > > +------------------------------------------------- > > +$ git push -f ssh://yourserver.com/~you/proj.git master > > +------------------------------------------------- > > + > > I didn't check the surrounding examples but would it make it a bit > too advanced to make the example flow push out more than one > branches here (perhaps he is also updating the 'maint' branch)? > Then use of "--force" can be explained as "Instead of adding + to > each and every refs to be pushed, you can use a single -f to force > everything." > > The mistake I would want to avoid teaching the readers is to replace > > push $there +master maint > > with > > push -f $there master maint > > or even worse > > push -f $there > push -f
If you feel the need to explain it to the list, we should probably have an explanatory example in the manual ;). What about suggesting `--dry-run` for sanity-checking forced pushes?
-- This email may be signed or encrypted with GnuPG (http://www.gnupg.org). For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy