Sync git repositories

Sometimes I need/have to sync a private repository with a public one, so this is what I usually  do.

Add a new remote

git remote add github

Pull the new commits from master

git pull github master

Push new commits to origin

git push origin master

Push new tags

git push --tags origin

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.