We've made the decision to migrate from GitHub to stash.
Using the instructions by Semyon Vadishev here, I managed to copy across the whole repository, including all branches and commits. Great! So now I've configured the new repository, but while I've been doing this, some 20+ developers have continued writing code and pushing to GitHub, so already my new repository is out of sync.
Now I've sent out an email to all developers putting them on notice that all their work must be committed and pushed to GitHub by the end of today, and tomorrow morning we'll make the switch.
But how do I sync these last few commits to Stash now? Or do I have to wipe out my Stash repository and rerun that whole process again? (Hint: the first option is very much preferable.)
Community moderators have prevented the ability to post new answers.
git clone --mirror <github_url> cd <reponame>.git git remote add stash <stash_url> git push --all stash git push --tags stash
[StackOverflow](http://stackoverflow.com/questions/5552879/synchronize-between-2-git-repositories) discusses this question as its a question for Git and not necessarily Stash.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to mirror the repository.
This is documented here. From your description, you can skip step 5 and all the updates should be done.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shaul,
You should be able to do something like this:
Best regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter, I'm fairly new to Git, so pardon my ignorance, but if I pull (step 3), won't that just get my current branch? How do I make sure that I have everything from all branches?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
True, you would indeed need to checkout each branch seperatly (you can get the name of all branches using the git branch -a command). Maybe you could actually do the following: # checkout the github repo locally # change the remote to your stash repository # do a git push origin -all Best regards, Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.