8

best way to synchronize two remote repositories in GIT

 3 years ago
source link: https://www.codesd.com/item/best-way-to-synchronize-two-remote-repositories-in-git.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

best way to synchronize two remote repositories in GIT

advertisements

We have one internal remote repository in stash and one repository in github for our third party consultants. We try to synch the repository in "Atlassian Stash" to the repository in GitHub everyday. The procedure I follow is to change the remote to github using set url and pull from github (the branch I desire) to my local directory and then I change the remote again to "stash" and push the changes there from my local directory. Is this a good approach or there is a better way to do it?


As @g19fanatic says, no need to keep changing the remote URL's. Just

git pull <name of stash remote>
git push <name of github remote>

You need two separate remotes for this; add the second one if needed with git remote add

Tags git

Related Articles

What is the best way to load multiple remote RSS feeds?

I'm working on a project where i need to load multiple (100+) remote RSS feeds, parse them and query for some keywords. Obviously this process is time consuming and i'm looking for the best way to implement this. My current implementation loads the f

How to synchronize two remote Git repositories?

I have two repository urls, and I want to synchronise them such that they both contain the same thing. In Mercurial, what I'm trying to do would be: hg pull {repo1} hg pull {repo2} hg push -f {repo1} hg push -f {repo2} This will result in two heads i

Best way to join two large datasets in Pandas

I'm downloading two datasets from two different databases that need to be joined. Each of them separately is around 500MB when I store them as CSV. Separately the fit into the memory but when I load both I sometimes get a memory error. I definitely g

The best way to compare two Dictionary & lt; T & gt; For Equality

Is this the best way to create a comparer for the equality of two dictionaries? This needs to be exact. Note that Entity.Columns is a dictionary of KeyValuePair(string, object) : public class EntityColumnCompare : IEqualityComparer<Entity> { public

Best way to synchronize iPhone time with the server

I have a client server model where server will send some data which has date parameters and iPhone will need to render it. Server and iPhone will resides in different timezones. So I need to synchronize times in both. Let say user has done some activ

What is the best way to return two lists in C #?

I am almost embarrassed to ask this question, but as a long time C programmer I feel that perhaps I am not aware of the best way to do this in C#. I have a member function that I need to return two lists of a custom type (List<MyType>) and I know be

What is the best way to synchronize QTableView and Database after inserting the record?

Let's suppose I have a QTableView with QSqlTableModel/Database. I don't want to let user edit the cells in QTableView. There are CRUD buttons that open new dialog forms and the user is supposed to enter data. After the user clicks dialog's OK button,

What is the best way to synchronize XmlWriter access to a file to prevent IOExceptions?

There are multiple places in an application which call XmlWriter.Create on the same file, all accessed through the following function. When one calls while another is still writing, I get an IOException. What's the best way to lock or synchronize acc

Android: What is the easiest way to synchronize a remote database in the background?

I have an Android database hosted in Parse and I have been trying to find the best way/practices to update my LocalStorage with the latest remote changes. I'm not asking for code or syntax, I would just be looking for a set of steps to follow, I'm su

What is the best way to update two tables at the same time in SQL?

I have two tables. one is "Data" and another one is "AnalyzedData" Two tables are for, first table "Data" is used to store basic data and another table to store details about analyzed data. In "Data" table we have 3

What is the best way to synchronize data between decoupled systems?

I have let's say 2 (but they'll become more in the future) fully decoupled systems: system A and system B. Let's say every piece of information on each system has an informationID. There's nothing stopping the informationID to be the same on differen

Best way to synchronize SQL 2000 and 2005 databases

I have a production database in SQL 2000 and a SQL 2005 instance will be installed in a new server. I would like to have an updated copy of one SQL 2000 database in my SQL 2005 at anytime. What is the best way to implement database sync between this

Perl best way to compare two lists of dates & amp; Numbers

I'm not sure where to start so I will start at the beginning. I have two lists containing two columns each. A date/time column and a number column in the following format: 2012-11-27 13:16:19.473 6 2012-11-27 13:17:17.910 710 2012-11-28 15:21:52.513

Java - best way to compare two lists & lt; List & lt; String & gt; & gt;

What's the best way to compare the String elements of two List<List<String>>... At the end, I want to know if they contain the same elements (true) or not (false) This two lists I want to compare: ObservableList<List<String>> fnlDa

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK