Skip to content

Instantly share code, notes, and snippets.

@InNoobWeTrust
Created April 30, 2017 20:25
Show Gist options
  • Save InNoobWeTrust/5b022909ad9c7856f726448261b6e0c6 to your computer and use it in GitHub Desktop.
Save InNoobWeTrust/5b022909ad9c7856f726448261b6e0c6 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# input username, password, group name, repository name through arguments in order
cp -r .git ../.git
git remote rm origin
git remote add origin https://$1:$2@bitbucket.org/$3/$4.git
git push origin --force --all
git push --tags
rm -r .git
mv ../.git .git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment