Back up code with another Git remote

At 42 school, we need to push code of projects to an internal Git server to be evaluated. However, I prefer to work on GitHub so that my code is public, and I benefit from Pull Requests, GitHub Actions, etc. When the project is finished, or to back up the project, I also push on the Git server of the school.

I create a new remote for the Git server of the school:

git remote add 42 <school-remote>

And then I push to it (mostly the main branch):

git push 42 main

Join my mailing list

Get monthly insights, personal stories, and in-depth information about what I find helpful in web development as a freelancer.

Email advice once a month + Free XState report + Free course on XState

I value your privacy and will never share your email address.