Direkt zum Hauptinhalt

Git repository handling tips

HowTo: 2 origins for MightyScape repository

Some notes about the .git/config file which contains settings to push to two remotes

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[remote "origin"]
    url = https://ACCESSTOKEN@gitea.fablabchemnitz.de/FabLab_Chemnitz/mightyscape-1.2.git
    fetch = +refs/heads/*:refs/remotes/origin/*
    pushurl = https://ACCESSTOKEN@gitea.fablabchemnitz.de/FabLab_Chemnitz/mightyscape-1.2.git
    pushurl = https://ACCESSTOKEN@github.com/eridur-de/mightyscape-1.2.git
[branch "master"]
    remote = origin
    merge = refs/heads/master
[remote "github"]
    url = https://ACCESSTOKEN@github.com/eridur-de/mightyscape-1.2.git
    fetch = +refs/heads/*:refs/remotes/github/*

API calls

Gitea has similar API structure like Github:

curl -s -k https://api.github.com/repos/eridur-de/mightyscape-1.2 | jq '.size'
curl -s -k https://gitea.fablabchemnitz.de/api/v1/repos/FabLab_Chemnitz/mightyscape-1.2 | jq '.size'