Skip to content

Instantly share code, notes, and snippets.

Created April 27, 2023 18:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Automatically pushing main branch to multiple repositories after each commit
# cat .git/hooks/post-commit # <= change this file in your repo to automatiicaly execute after each commit
cd /path/to/your/repo
git push gitlab master && git push github master && git push anotherserver master
# You may want to add your different remotes using:
# git remote add REMOTENAME git@server.domain:group/project.git #this is ssh example
# (and REMOTENAME above was gitlab, github, anotherserver...)
Copy link

gwpl commented Apr 27, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment