Not understanding git (again)

Gerben Wierda gerben.wierda at rna.nl
Wed Aug 28 10:22:24 UTC 2019


Answering my own question:

git branch --set-upstream-to=origin/master gwdev20190828

After which port -d sync worked.

Am I all set now?

Gerben Wierda
Chess and the Art of Enterprise Architecture <http://enterprisechess.com/>
Mastering ArchiMate <http://masteringarchimate.com/>
Architecture for Real Enterprises <https://www.infoworld.com/blog/architecture-for-real-enterprises/> at InfoWorld
On Slippery Ice <https://eapj.org/on-slippery-ice/> at EAPJ

> On 28 Aug 2019, at 12:15, Gerben Wierda <gerben.wierda at rna.nl> wrote:
> 
> I’ve given up on getting my broken local git and own fork repaired. So, I’ve deleted my fork on GitHub and locally and started anew.
> 
> $ cd ~/MacPortsDev/
> $ rm -rf macports-ports
> $ git clone https://github.com/gctwnl/macports-ports.git <https://github.com/gctwnl/macports-ports.git> macports-ports
> $ cd macports-ports/
> $ port portindex
> $ sudo port selfupdate
> $ git branch gwdev20190828
> $ git checkout gwdev20190828
> $ git remote add upstream https://github.com/macports/macports-ports.git <https://github.com/macports/macports-ports.git>
> $ git fetch upstream
> $ git remote -v
> origin	https://github.com/gctwnl/macports-ports.git <https://github.com/gctwnl/macports-ports.git> (fetch)
> origin	https://github.com/gctwnl/macports-ports.git <https://github.com/gctwnl/macports-ports.git> (push)
> upstream	https://github.com/macports/macports-ports.git <https://github.com/macports/macports-ports.git> (fetch)
> upstream	https://github.com/macports/macports-ports.git <https://github.com/macports/macports-ports.git> (push)
> $ git remote rename origin local
> $ git remote rename upstream origin
> $ git remote -v
> local	https://github.com/gctwnl/macports-ports.git <https://github.com/gctwnl/macports-ports.git> (fetch)
> local	https://github.com/gctwnl/macports-ports.git <https://github.com/gctwnl/macports-ports.git> (push)
> origin	https://github.com/macports/macports-ports.git <https://github.com/macports/macports-ports.git> (fetch)
> origin	https://github.com/macports/macports-ports.git <https://github.com/macports/macports-ports.git> (push)
> 
> At which point, I thought I should be able to do a port -d sync. But it failed:
> 
> Albus:macports-ports sysbh$ sudo port -d sync
> Password:
> DEBUG: Copying /Users/sysbh/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences
> --->  Updating the ports tree
> Synchronizing local ports tree from file:///Users/sysbh/MacPortsDev/macports-ports <file:///Users/sysbh/MacPortsDev/macports-ports>
> DEBUG: euid/egid changed to: 501/20, env: HOME=/Users/sysbh SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.zF2wX4hO15/Listeners
> DEBUG: /usr/bin/git pull --rebase --autostash
> DEBUG: system -W /Users/sysbh/MacPortsDev/macports-ports: /usr/bin/git pull --rebase --autostash
> There is no tracking information for the current branch.
> Please specify which branch you want to rebase against.
> See git-pull(1) for details.
> 
>     git pull <remote> <branch>
> 
> If you wish to set tracking information for this branch you can do so with:
> 
>     git branch --set-upstream-to=<remote>/<branch> gwdev20190828
> 
> Command failed: /usr/bin/git pull --rebase --autostash
> Exit code: 1
> DEBUG: euid/egid restored to: 0/0, env restored
> DEBUG: command execution failed
>     while executing
> "system -W $dir $cmd"
>     (procedure "macports::UpdateVCS" line 1)
>     invoked from within
> "macports::UpdateVCS $cmd $dir"
>     ("uplevel" body line 2)
>     invoked from within
> "uplevel 1 $body"
> Syncing local Git ports tree failed
> Synchronizing local ports tree from rsync://rsync.macports.org/macports/release/tarballs/ports.tar <rsync://rsync.macports.org/macports/release/tarballs/ports.tar>
> DEBUG: system: /usr/bin/rsync -rtzvl --delete-after --include=/ports.tar --include=/ports.tar.rmd160 --exclude=* rsync://rsync.macports.org/macports/release/tarballs/ <rsync://rsync.macports.org/macports/release/tarballs/> /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs <http://rsync.macports.org/macports/release/tarballs>
> 
> Willkommen auf dem RSYNC-server auf ftp.fau.de <http://ftp.fau.de/>.
> Nicht all unsere Mirror sind per rsync verfuegbar.
> 
> Welcome to the RSYNC daemon on ftp.fau.de <http://ftp.fau.de/>.
> Not all of our mirrors are available through rsync.
> 
> 
> receiving file list ... done
> ./
> 
> sent 68 bytes  received 99 bytes  334.00 bytes/sec
> total size is 69335040  speedup is 415179.88
> DEBUG: successful verification with key /opt/local/share/macports/macports-pubkey.pem
> DEBUG: system: /usr/bin/tar -C /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/tmp <http://rsync.macports.org/macports/release/tarballs/tmp> -xf /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports.tar <http://rsync.macports.org/macports/release/tarballs/ports.tar>
> DEBUG: system: chmod -R a+r /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs <http://rsync.macports.org/macports/release/tarballs>
> DEBUG: system: /opt/local/bin/portindex /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports <http://rsync.macports.org/macports/release/tarballs/ports>
> Creating port index in /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports <http://rsync.macports.org/macports/release/tarballs/ports>
> Warning: No value for java JAVA_HOME was automatically discovered
> Adding port databases/dbeaver-community
> Adding port security/xca
> 
> Total number of ports parsed:	2 
> Ports successfully parsed:	2 
> Ports failed:			0 
> Up-to-date ports skipped:	21640
> 
> DEBUG: Synchronization of 1 source failed
>     while executing
> "mportsync [array get global_options]"
> port sync failed: Synchronization of 1 source failed
> 
> I tried to repair:
> 
> Albus:macports-ports sysbh$ git branch --set-upstream-to=macports/macports-ports gwdev20190828
> error: the requested upstream branch 'macports/macports-ports' does not exist
> hint: 
> hint: If you are planning on basing your work on an upstream
> hint: branch that already exists at the remote, you may need to
> hint: run "git fetch" to retrieve it.
> hint: 
> hint: If you are planning to push out a new local branch that
> hint: will track its remote counterpart, you may want to use
> hint: "git push -u" to set the upstream config as you push.
> 
> What am I missing?
> 
> I know what situation I want:
> 
> macports/macports-ports being called origin on my system
> fork gctwnl/macports-ports being called local on my system and for now identical to macports/macports-ports
> fork gctwnl/macports-ports being used as local repository (so in sources.conf and indexed with portindex)
> Use branches (a single branch will probably be enough) within fork gctwnl/macports-ports to do my work.
> 
> At which point updating my local fork & branch with updates from the macports/macports-ports should work, I think.
> 
> But apparently I’ve done something wrong again.
> 
> Gerben Wierda
> Chess and the Art of Enterprise Architecture <http://enterprisechess.com/>
> Mastering ArchiMate <http://masteringarchimate.com/>
> Architecture for Real Enterprises <https://www.infoworld.com/blog/architecture-for-real-enterprises/> at InfoWorld
> On Slippery Ice <https://eapj.org/on-slippery-ice/> at EAPJ
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20190828/7fd5bd8a/attachment.html>


More information about the macports-users mailing list