Skip to content

Instantly share code, notes, and snippets.

@litodam
Last active December 10, 2015 13:09
Show Gist options
  • Save litodam/4439378 to your computer and use it in GitHub Desktop.
Save litodam/4439378 to your computer and use it in GitHub Desktop.
Git commands
REM git clone repo --mirror first
REM If running this in a batch file, replace %R by %%R
for /F "tokens=1 delims=/" %R in ('git branch') do git push github %R --tags
REM git clone first
REM If running this in a batch file, replace %R by %%R
for /F "tokens=2 skip=1 delims=/" %R in ('git branch -r') do git branch %R --track origin/%R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment