Re: Why does git branch -a

2021-10-23 Thread Gerben Wierda via macports-users

Gerben Wierda (LinkedIn )
R Enterprise Architecture  (main site)
Book: Chess and the Art of Enterprise Architecture 
Book: Mastering ArchiMate 

> On 23 Oct 2021, at 12:13, Henning Hraban Ramm  wrote:
> 
> Hi Gerben!
> 
>> Am 23.10.2021 um 11:58 schrieb Gerben Wierda via macports-users 
>> :
>> 
>> # remotes:
>> #   upstream: github/macports/macports-ports is the original macports.org 
>> repo in github
>> #   origin: github/gctwnl/macports-ports is my FORK of 
>> github/macports/macports-ports on github
>> # local:
>> #   ~/MacPortsDev/macports-ports is the local CLONE of 
>> github/gctwnl/macports-ports
>> 
>> albus:macports-ports sysbh$ git branch -a
>>  dovecot-2.3.16
>> * master
>>  upstream
>>  remotes/origin/HEAD -> origin/master
>>  remotes/origin/dovecot-2.3.16
>>  remotes/origin/master
>>  remotes/origin/multiple-unbounds
>>  remotes/upstream/boost_1.72.0_update
>>  remotes/upstream/dar
>>  remotes/upstream/kencu-py-sphinxcontrib-svg2pdfconverter
>>  remotes/upstream/master
>>  remotes/upstream/py38-reproject
>>  remotes/upstream/wireshark3-3-0-5
>> 
>> But I do not fully understand the remotes/origin ones. Specifically: 
>> remotes/origin/multiple-unbounds. I did some work on unbound as well 
>> (enabling to run multiple parallel unbound resolvers from launchd) and this 
>> has been pulled into the main repository. When that had happened, I deleted 
>> my branch. Apparently I forgot to do something because it still shows up in 
>> remotes/origin. Why, though? What did I forget to do?
> 
> Origin is your fork of upstream, and when you deleted your local branch, you 
> apparently didn’t delete the same branch on origin.
> Each repository is independent.
> 

Yes, I’m reading this now. And I’ve also just read that to explicitly delete 
the remote branch I need to do

git push origin -d remote-branch-name

So, somewhat surprisingly (for me at least) is that to remove an origin branch 
I need the ‘git push’ command.

G

Re: Why does git branch -a

2021-10-23 Thread Henning Hraban Ramm
Hi Gerben!

> Am 23.10.2021 um 11:58 schrieb Gerben Wierda via macports-users 
> :
> 
> # remotes:
> #   upstream: github/macports/macports-ports is the original macports.org 
> repo in github
> #   origin: github/gctwnl/macports-ports is my FORK of 
> github/macports/macports-ports on github
> # local:
> #   ~/MacPortsDev/macports-ports is the local CLONE of 
> github/gctwnl/macports-ports
> 
> albus:macports-ports sysbh$ git branch -a
>   dovecot-2.3.16
> * master
>   upstream
>   remotes/origin/HEAD -> origin/master
>   remotes/origin/dovecot-2.3.16
>   remotes/origin/master
>   remotes/origin/multiple-unbounds
>   remotes/upstream/boost_1.72.0_update
>   remotes/upstream/dar
>   remotes/upstream/kencu-py-sphinxcontrib-svg2pdfconverter
>   remotes/upstream/master
>   remotes/upstream/py38-reproject
>   remotes/upstream/wireshark3-3-0-5
> 
> But I do not fully understand the remotes/origin ones. Specifically: 
> remotes/origin/multiple-unbounds. I did some work on unbound as well 
> (enabling to run multiple parallel unbound resolvers from launchd) and this 
> has been pulled into the main repository. When that had happened, I deleted 
> my branch. Apparently I forgot to do something because it still shows up in 
> remotes/origin. Why, though? What did I forget to do?

Origin is your fork of upstream, and when you deleted your local branch, you 
apparently didn’t delete the same branch on origin.
Each repository is independent.

HTH
Hraban



signature.asc
Description: Message signed with OpenPGP


Why does git branch -a

2021-10-23 Thread Gerben Wierda via macports-users
Hello fellow macports users,

As I sometimes try to support stuff myself on macports (very little time for 
it, so only now and then and that means I tend to forget stuff…) I have created 
instructions for myself to get me back up to speed when it is time again to try 
to do some stuff with macports on git

For this, I have this snippet of documentation:

# Definitions
# remotes:
#   upstream: github/macports/macports-ports is the original macports.org repo 
in github
#   origin: github/gctwnl/macports-ports is my FORK of 
github/macports/macports-ports on github
# local:
#   ~/MacPortsDev/macports-ports is the local CLONE of 
github/gctwnl/macports-ports

# Updating the master of my fork from the master of the original:

git checkout master # Go to branch master in my local clone
git pull upstream master# Update my local clone master from the 
master of the remote upstream
# (overwrites my local master with 
remote github/macports/master)
git reset --hard upstream/master# Resets index and working tree of 
local clone/master from remote upstream
git push origin master --force  # Push local clone 
(~/MacPortsDev/macports-ports) master back
# to my own remote fork 
(github/gctwnl/macports-ports)
# NOTE: this closes all open 
pull-requests!
# username: gctwnl
# password: GitHub Token (in BitWarden)

When I today ran git branch -a  after that I got:

albus:macports-ports sysbh$ git branch -a
  dovecot-2.3.16
* master
  upstream
  remotes/origin/HEAD -> origin/master
  remotes/origin/dovecot-2.3.16
  remotes/origin/master
  remotes/origin/multiple-unbounds
  remotes/upstream/boost_1.72.0_update
  remotes/upstream/dar
  remotes/upstream/kencu-py-sphinxcontrib-svg2pdfconverter
  remotes/upstream/master
  remotes/upstream/py38-reproject
  remotes/upstream/wireshark3-3-0-5

I understand the first three: I’m on master, I still have the dovecot-2.3.16 
branch in my clone as I haven’t removed it yet. I used it a while back as part 
of work by a number of people updating dovecot. Dovecot is now also at 2.3.16 
in the main repo. I am going to clean that up (haven’t yet)
I also understand the 6 remotes/upstream entries at the end, these are branches 
in the main repo.
But I do not fully understand the remotes/origin ones. Specifically: 
remotes/origin/multiple-unbounds. I did some work on unbound as well (enabling 
to run multiple parallel unbound resolvers from launchd) and this has been 
pulled into the main repository. When that had happened, I deleted my branch. 
Apparently I forgot to do something because it still shows up in 
remotes/origin. Why, though? What did I forget to do?

Gerben Wierda (LinkedIn )
R Enterprise Architecture  (main site)
Book: Chess and the Art of Enterprise Architecture 
Book: Mastering ArchiMate