Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I migrated all my repo(S) from GIthub to STASH. Still some of the developers are working in Github. Is there a way to have my Github repo synced onto the migrated STASH repo on a daily basis .
i got the daiyl update feature fixed by writing a script which will fetch from origin[github] and then push all the changes to stash.
Rahul,
There's a plugin in the marketplace - free - that is will execute push's against repo's. You can read more about it here:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi William thanks for the answer, but i have already figured out a way of mirroring the rpeo and have scripted that and got it working..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rahul,
I added that comment more for people who find your question/answer while looking for how to sync 2 stash instances, as I am, than any other reason. These questions/answers are perpetual....and if you're lucky (or not) you'll find this post 10 years from now b/c you're having to lookup how to do something you've long forgotten...I know I have several times. I laugh at the posts I was making back in 2004.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
also i got the daiyl update feature fixed by writing a script which will fetch from origin[github] and then push all the changes to stash.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks for warning me :-) . but i am taking care of that...
also i got the daiyl update feature fixed by writing a script which will fetch from origin[github] and then push all the changes to stash.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rahul,
Depends on what you mean by 'synced'? Because this is Git/DVCS you could easy set up a CI build (eg. Bamboo, Jenkins, etc) that regularly pulls from Github and pushes to Stash.
However, if you're modifying both repositories at the same time then things get tricky. At this point your build will need to merge all branches (one at a time) that are being updated, and then fail if there are any merge conflicts. These merge conflicts will also get more severe as time goes on unless you push the merges back to both repositories. I would highly recommend for each repository you only have one writable copy, either in Stash or Github
Does that make sense? You might be interested in this feature request:
https://jira.atlassian.com/browse/STASH-2714
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rahul,
That's good to hear - it makes things much easier.
Basically a 'git clone --mirror $GITHUB && git remote add --mirror=push stash $STASH && git push stash' or thereabouts should work. Please test first of course - be a little careful with mirror as it can override all of your refs in a single push.
Cheers,
Charles
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
only the github would be modified. the stash repo will be untouched. So how can i basically do that ? would git pull and git push --all stash work here ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
please provide your suggestions as i have no clue whether this can be done.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.