From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Mateusz Loskot <mateusz@loskot.net>
Cc: git@vger.kernel.org
Subject: Re: Simple git push --tags deleted all branches
Date: Thu, 29 Nov 2018 16:03:30 +0100 [thread overview]
Message-ID: <87y39cx6wt.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <CABUeae-e33Jc4s4MezjhpVsEJ_0sO8QZ1mpa1z_79ZGuQWM-Xw@mail.gmail.com>
On Wed, Nov 28 2018, Mateusz Loskot wrote:
> Hi,
>
> (using git version 2.19.2.windows.1)
>
> I've just encountered one of those WTH moments.
>
> I have a bare repository
>
> core.git (BARE:master) $ git branch
> 1.0
> 2.0
> * master
>
> core.git (BARE:master) $ git tag
> 1.0.1651
> 1.0.766
> 2.0.1103
> 2.0.1200
>
> I published the repo using: git push --all --follow-tags
>
> This succeeded, but there seem to be no tags pushed, just branches.
> So, I followed with
>
> core.git (BARE:master) $ git push --tags
> To XXX
> - [deleted] 1.0
> - [deleted] 2.0
> ! [remote rejected] master (refusing to delete the current
> branch: refs/heads/master)
> error: failed to push some refs to 'XXX'
>
> And, I've found out that all branches and tags have been
> wiped in both, local repo and remote :)
>
> I restored the repo and tried out
>
> git push origin 1.0
> git push origin --tags
>
> and this time both succeeded, without wiping out any refs.
>
> Could anyone help me to understand why remote-less
>
> git push --tags
>
> is/was so dangerous and unforgiving?!
Since nobody's replied yet, I can't see what's going on here from the
info you've provided. My guess is that you have something "mirror" set
on the remote.
It seems you can't share the repo or its URL, but could you share the
scrubbed output of 'git config -l --show-origin' when run inside this
repository?
next prev parent reply other threads:[~2018-11-29 15:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 16:50 Simple git push --tags deleted all branches Mateusz Loskot
2018-11-28 18:13 ` Mateusz Loskot
2018-11-29 15:03 ` Ævar Arnfjörð Bjarmason [this message]
2018-11-29 15:18 ` Mateusz Loskot
2018-11-29 15:39 ` Ævar Arnfjörð Bjarmason
2018-12-04 19:00 ` Mateusz Loskot
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=87y39cx6wt.fsf@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=mateusz@loskot.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).