Skip to main content

Delete Branch

Pushing

Delete toLocal multiple origins ensures that a repo is always available. While I use Gitlab as my main repository, I might want to mirror it to Bitbucket, Github, or another GitLab for redundancy.

As an example, if my server ever needed to be rebuilt it would be much easier to clone my services repository from a mirrored copy on Bitbucket than jump through the hoops of getting Gitea set back up—especially since the docker-compose configuration file for Gitea is stored in that very same services repository.

Push to two origins

Branch

git remote set-urlbranch --addd --some-branch

Delete Remote Branch

git push origin git://original/repo.git
git remote set-url --adddelete --push origin git://another/repo.gitsome-branch