----- isHidden: false menupriority: 1 kind: article created_at: 2010-03-22T10:42:27+02:00 title: Git Tips author_name: Yann Esposito author_uri: yannesposito.com tags: - git - tip ----- ## clone from github behind an evil firewall Standard:
git clone git@github.com:yogsototh/project.git
git clone git+ssh://git@github.com:443/yogsototh/project.git
git branch --track local_branch remote_branch
$ git clone git@github:yogsototh/example.git
$ git branch
master *
$ git branch -a
master *
remotes/origin/HEAD -> origin/master
remotes/origin/experimental
$ git branch --track experimental remotes/origin/experimental
$ git branch
master *
experimental
# first clone your project
$ git clone git@github.com:yogsototh/project.git
# copy all branches
$ zsh
$ cd project
$ for br in $( git br -a ); do
case $br in
remotes/*) print $br ;
case ${br:t} in
master|HEAD) continue ;;
*) git branch --track ${br:t} $br ;;
esac ;;
esac
done