Post ALENldOK8d6x8D6nFw by mark@mastodon.pdbq.us
(DIR) More posts by mark@mastodon.pdbq.us
(DIR) Post #ALENNjq4VyjEB6h1km by fabiscafe@mstdn.social
2022-07-06T19:28:11Z
1 likes, 5 repeats
#Git Did you know that you can set 2 or more remotes with the same alias and so push to both (or more) of them at the same time when doing a git push?That way you can push to gitlab, gitea and github in a single commandtook me way, waaay to long to realize. :blobcatnotlikethis:
(DIR) Post #ALENQsDVp0kZ1z9UDw by worldsendless@qoto.org
2022-07-07T00:05:24Z
0 likes, 0 repeats
@fabiscafe example code please please?
(DIR) Post #ALENldOK8d6x8D6nFw by mark@mastodon.pdbq.us
2022-07-07T00:09:08Z
0 likes, 0 repeats
@worldsendless @fabiscafegit remote add <name> <url>git remote add <name> <other url>
(DIR) Post #ALEQNtQdA0QrmZYgWu by worldsendless@qoto.org
2022-07-07T00:38:29Z
0 likes, 0 repeats
@mark @fabiscafe thank you!
(DIR) Post #ALF1aeOY3x9bE1WynY by duponin@udongein.xyz
2022-07-07T07:35:22.017285Z
0 likes, 0 repeats
@fabiscafe i usually add a “fork” remote when forking a project to contribute or work on“origin” remote is the upstream where I’m read-only and “fork” is… you get itHow do you push to all remotes at once?
(DIR) Post #ALF2K9HK5MYy2WqXgm by fabiscafe@mstdn.social
2022-07-07T07:42:57Z
1 likes, 0 repeats
@duponin you add all the remotes you want to push to in one alias and if you push to that alias it will push to all of them
(DIR) Post #ALF2MU5zesenBNf2f2 by lanodan@queer.hacktivis.me
2022-07-07T07:43:52.305335Z
1 likes, 0 repeats
@duponin @fabiscafe I think their case is more for mirrors, which here just do at the hooks level on my own git setup so I wouldn't have to set things up in multiple places.For example:https://hacktivis.me/git/dotfiles.git/confighttps://hacktivis.me/git/dotfiles.git/hooks/post-update.mirror
(DIR) Post #ALIG4aQdM78CRZYSv2 by marty@fosstodon.org
2022-07-08T20:18:18Z
1 likes, 0 repeats
@duponin @fabiscafe I simply have an alias in my global git config which takes care of this for me, should work for multiple remotes with the same name as well: `pushall = "!git remote | xargs -I R git push R"`