>>> "KK" == Konstantin Khomoutov <kos...@bswap.ru> writes:

> On Sun, Nov 28, 2021 at 09:02:46AM +0100, Uwe Brauer wrote:
> [...]

>>> That wasn't needed; you would have been better off by merely running
>> As I said, I want to get rid of those commits and to check what other
>> users see. When I browse with say firefox the repository the commits are
>> still there.

> I think that is us not sharing the same context ;-)


Oops sorry..
> In your original post, I've seen three branches involved, one of which was
> "master". Most of the time "master" is what maintains the main line of the
> development, and users do not "just see" some commits - they always see them
> on some branch. With these premises in mind, I have assumed you're interested
> in fixing the "master" branch.

Ok, right, I see now that I left out that important part of information. 
It should have been

    1. I created the copyright (and copy branch one of them was silly anyway) 
and

    2. Added two commits into that branch(es), if I remember correctly one
       commit belonged to two branches (that is possible right?)

    3. In any case I pushed these and caused a mess.

    4. So I needed to delete/remove the commits and the branches.

>>> git branch -D copy copyright
>> 
>> As I said this give error, but 

> That's because the command means "delete the local branches „copy” and
> „copyright”". From your original post, it wasn't clear you do not have such
> local branches.

That is were I was  (and still am) confused: I created these branches locally 
and
then pushed, I thought they would then be in both places: in my local
repository and in the remote server repository.

>> git branch -rD orgin/copy
>> 
>> Works

> This command deleted the remote branches.
> Well, given the above, this is OK. Not really needed but will hide this
> obsolete stuff from the output of `git log --all`.

> Just for the record

>   git push origin :copy :copyright

> followed by

>   git fetch --prune origin

> or

>   git prune origin

> would get rid of those remote branches as well.

Ok thanks for telling me. I will in the future double cautious and first
push to a sandbox somewhere before pushing to a shared repository.

regards

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/875ysasygs.fsf%40mat.ucm.es.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to