- Create two repositories: one on Github and another one on Bitbucket
- Clone Github repository
- Add some files and commit them into your local repository
- Add Bitbucket remote url
- Push the code into GitHub and BitBucket repo
git clone git@github.com:codejagd/hello.git ls test vim file.txt git add. git commit -m "a" git remote -v git branch -a git remote add origin_bitbucket https://codejagd@bitbucket.org/codejagd/hello.git git push -u origin main git push -u origin_bitbucket main
To check the remote repository added
git remote -v
Renaming a remote repository
git remote -v origin https://github.com/name/repoName.git (fetch) origin https://github.com/name/repoName.git (push)
Removing a remote repository
git remote -v origin https://github.com/name/repoName.git (fetch) origin https://github.com/name/repoName.git (push) destination https://github.com/name2/repoName.git (fetch) destination https://github.com/name2/repoName.git (push) git remote rm destination git remote -v