107 days ago · Tech · hide · Fediverse post

I wanted to keep my code in multiple remotes. github since it is still where everyone reaches to see what I'm doing. codeberg since it is my preferred forge. Apparently git supported multiple remotes for fetch and push, so this is how i configured my repo. After initializing git and making some commits, I first added the two remotes: github and codeberg respectively. git remote add codeberg ssh://git@codeberg.org/user/project.git git remote add github git@github.com:user/project.git Then, I set up origin so that it fetches from codeberg but pushes to both codeberg and github. To set the fetch URL to point to codeberg: git remote add origin ssh://git@codeberg.org/user/project.git Then, to add both codeberg and github as push URLs: git remote set-url --add --push origin ssh://git@codeberg.org/scientiac/interpretingo.git git remote set-url --add --push origin git@github.com:scientiac/interpretingo.git To verify that everything works properly I checked it by running the following command:…

Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town