Skip to content

Instantly share code, notes, and snippets.

@adelarcubs
Last active October 2, 2018 23:35
Show Gist options
  • Save adelarcubs/ecc5714ffa8a8a62b52c7e97e50c21b1 to your computer and use it in GitHub Desktop.
Save adelarcubs/ecc5714ffa8a8a62b52c7e97e50c21b1 to your computer and use it in GitHub Desktop.
#Forma de resolver o ssh-agent no docker
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
#Git no jenkins deixa sem branch
git checkout master
#Verifica quais branchs estão criadas no repositório e depois baixa elas localmente
git branch -r | grep -v '\->' | grep -v 'master' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
#Adiciona o repositório clone
git remote add origin-mirror git@github.com:adelarcubs/repo_base_copy.git
#Envia tudo para o clone
git push -u origin-mirror --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment