$ git init
$ git remote add origin git@bitbucket.org:<user>/<repository>
$ git remote add origin git@gitlab.com:<user>/<repository>
git push -u origin master
git remote set-url origin git@gitlab.com:<user>/<repository>
$ git config --global alias.hist "log --oneline --graph --decorate --all " $ git config --global alias.hisn "log --oneline --graph --decorate --name-only --all "
$ git config --global user.name "John Doe" $ git config --global user.email johndoe@example.com $ git config --global core.editor nano $ git config --global pager.log false
To only use pager for output longer than one page
$ git config --global --replace-all core.pager "less -F"
git submodule add git@bitbucket.org:user/<package>.git <destination>
git submodule update --remote <path to the submodule>
Source: https://stackoverflow.com/questions/13669410/clear-git-repository-on-bitbucket
No need to delete it.
From your new local repo create directory or remote simple the .git, if you want upload (without history) an existing repo:
$ rm -rf .git
Recreate the repos from the current content only
$ git init $ git add . $ git commit -m "Initial commit"
Then simply push to the github remote repos ensuring you overwrite history:
$ git push --force -u origin master
That will replace the history of your BitBucket master branch by the new one you have done locally.
Now, if you had pushed other branches before, you might want to delete them.
$ git push origin :oldBranch