From: Anders Melchiorsen <mail@cup.kalibalik.dk>
To: git@vger.kernel.org
Subject: Re: Some updates to refspec documentation
Date: Wed, 29 Oct 2008 21:41:13 +0100 [thread overview]
Message-ID: <878ws7b0d2.fsf@cup.kalibalik.dk> (raw)
In-Reply-To: <1225311945-17100-1-git-send-email-mail@cup.kalibalik.dk> (Anders Melchiorsen's message of "Wed\, 29 Oct 2008 21\:25\:38 +0100")
During my struggle, I also found a git push usability problem. The
refspec ":dst" will delete the remote branch without warning.
While this is indeed documented, you cannot blame somebody for
thinking that a left out <src> will default to HEAD, as it does for so
many other commands.
In a CVS-like setup, with everybody pushing to master, this could
cause havoc.
As the "git push <repository> :<dst>" operation is destructive, I
think it should be protected by the -f option.
For the record, I did realize this before trying to push ":master" :-).
Anders.
next prev parent reply other threads:[~2008-10-29 20:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 20:25 Some updates to refspec documentation Anders Melchiorsen
2008-10-29 20:25 ` [PATCH 1/7] Documentation: do not use regexp in refspec descriptions Anders Melchiorsen
2008-10-29 20:25 ` [PATCH 2/7] Documentation: git push repository can also be a remote Anders Melchiorsen
2008-10-29 20:25 ` [PATCH 3/7] Documentation: rework SHA1 description in git push Anders Melchiorsen
2008-10-29 20:25 ` [PATCH 4/7] Documentation: remove a redundant elaboration Anders Melchiorsen
2008-10-29 20:25 ` [PATCH 5/7] Documentation: elaborate on pushing tags Anders Melchiorsen
2008-10-29 20:25 ` [PATCH 6/7] Documentation: mention branches rather than heads Anders Melchiorsen
2008-10-29 20:25 ` [PATCH 7/7] Documentation: avoid using undefined parameters Anders Melchiorsen
2008-10-29 20:40 ` [PATCH 5/7] Documentation: elaborate on pushing tags Daniel Barkalow
2008-10-31 5:36 ` [PATCH 3/7] Documentation: rework SHA1 description in git push Junio C Hamano
2008-11-02 20:13 ` Anders Melchiorsen
2008-10-31 5:35 ` [PATCH 1/7] Documentation: do not use regexp in refspec descriptions Junio C Hamano
2008-11-02 17:08 ` Anders Melchiorsen
2008-10-29 20:41 ` Anders Melchiorsen [this message]
2008-10-29 20:44 ` Some updates to refspec documentation Anders Melchiorsen
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=878ws7b0d2.fsf@cup.kalibalik.dk \
--to=mail@cup.kalibalik.dk \
--cc=git@vger.kernel.org \
/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.