Skip to content

Instantly share code, notes, and snippets.

@koromerzhin
Created May 13, 2019 15:20
Show Gist options
  • Save koromerzhin/5ccc940a08e84587f3a5dc5892cc4407 to your computer and use it in GitHub Desktop.
Save koromerzhin/5ccc940a08e84587f3a5dc5892cc4407 to your computer and use it in GitHub Desktop.
transfert depot 1 vers depot 2
@echo off
mkdir TEMP_REPO_FOLDERNAME
cd TEMP_REPO_FOLDERNAME
git init --bare .git
git remote add origin %1
git fetch origin refs/heads/*:refs/heads/*
git fetch origin refs/tags/*:refs/tags/*
git init
git checkout master
git remote rm origin
git remote add origin %2
git push -u origin master
git push --all
cd ..
rmdir /Q /s TEMP_REPO_FOLDERNAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment