Home > EN, Tips & Tricks > How to add another repo/remote to the same folder directory

How to add another repo/remote to the same folder directory


Usually all source code version control is done inside our company repo but in some situations we need to publish the code to the customer’s repo when a new version is ready to production.

It’s not rare to send over the code zipped but then the customer will not be able to track the changes made on those files.

But now that DevOps concepts is on the spot we are also entitled to publish the release version to the customers’ repo and this action will trigger some code analysis, tests, and deployment!

So why not push the code/branch directly to customer’s repo maintaining the commits that had been made during development.


In this post I’ll use two repos that I created previously:

I’ve published a .NET Core project with some initial commits on GitHub’s repo:



Now, to push these files to Azure DevOps repo with the commits history we need to add another remote to our local repo:

  • Git remote add <alias> <remote-git-url>


To push the “secondary” repo:

  • Git push secondary


Done! We can see our code (with history) on Azure DevOps repo!


  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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

%d bloggers like this: