From 596d757dee5d1baceb4a303f348d653e5f0631de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mert=20G=C3=B6r?= Date: Thu, 15 Feb 2024 22:39:59 +0300 Subject: [PATCH] Multiple Forge addresses explained --- multiple-forge.md | 58 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 multiple-forge.md diff --git a/multiple-forge.md b/multiple-forge.md new file mode 100644 index 0000000..8ad5210 --- /dev/null +++ b/multiple-forge.md @@ -0,0 +1,58 @@ +# Multiple Git repositories to push at once + +First we create remote repositories on the related forge web user interfaces. + +For this repository it is : + +* [GitHub](https://github.com/hwpplayer1/hacker-how-to) +* [GitLab](https://gitlab.com/masscollabs/masscollaborationlabs/hacker-how-to) +* [sr.ht](https://git.sr.ht/~mertgor/hacker-how-to) +* [vern.cc](https://git.vern.cc/hwpplayer1/hacker-how-to) +* [Disroot](https://git.disroot.org/hwpplayer1/hacker-how-to) +* [Codeberg](https://codeberg.org/hwpplayer1/hacker-how-to) + +and your local forge (for me it is forgejo) + +We add SSH addresses but you may add the https addresses + +Here it is step by step + +```git clone git@github.com:hwpplayer1/hacker-how-to.git``` + +Then ```cd hacker-howo-to``` + +After thıs change the ```origin``` with ```github``` and add ```git remote add all git@github.com:hwpplayer1/hacker-how-to.git``` + +This will make the GitHub all address to lead all repositories + +After this add GitLab ```git remote add gitlab git@gitlab.com:masscollabs/masscollaborationlabs/hacker-how-to.git``` + +sr.ht ```git remote add sr.ht git@git.sr.ht:~mertgor/hacker-how-to``` + +vern.cc ```git remote add vern.cc ssh://git@vern.cc:1813/hwpplayer1/hacker-how-to.git``` + +disroot ```git remote add disroot git@git.disroot.org:hwpplayer1/hacker-how-to.git``` + +and codeberg ```git remote add codeberg git@codeberg.org:hwpplayer1/hacker-how-to.git``` + +After this we will execute ```git remote set-url --add --push all``` command for each git ssh address + +They are : + +```git remote set-url --add --push all git@github.com:hwpplayer1/hacker-how-to.git``` + +```git remote set-url --add --push all git@gitlab.com:masscollabs/masscollaborationlabs/hacker-how-to.git``` + +```git remote set-url --add --push all git@git.sr.ht:~mertgor/hacker-how-to``` + +```git remote set-url --add --push all ssh://git@vern.cc:1813/hwpplayer1/hacker-how-to.git``` + +```git remote set-url --add --push all git@git.disroot.org:hwpplayer1/hacker-how-to.git``` + +```git remote set-url --add --push all git@codeberg.org:hwpplayer1/hacker-how-to.git``` + +and for my local forge as forgejo it is ```git remote set-url --add --push all git@127.0.0.1:hwpplayer1/hacker-how-to.git``` + +Then run ```git add .``` for your files ```git commit -S -m "Your Commit Message"``` and run ```git push -uv all``` to push your commits to remote. + +**happy hacking!...**