Skip to content

Instantly share code, notes, and snippets.

View AlekseyLeshko's full-sized avatar
🦜
multitasking

Aleksey Leshko AlekseyLeshko

🦜
multitasking
View GitHub Profile
@AlekseyLeshko
AlekseyLeshko / script
Last active August 9, 2020 09:44
Migrate a repo from BitBucket to GitHub with all branches and tags
1 Donwload load a repo from BitBucket
```
git clone https://[email protected]/USER/PROJECT.git
cd PROJECT
```Bash
2 Download all branches
```
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
or