Skip to content

Instantly share code, notes, and snippets.

View ErykJaroszewicz's full-sized avatar
🏠
Working from home

Eryk Jaroszewicz ErykJaroszewicz

🏠
Working from home
View GitHub Profile
@ErykJaroszewicz
ErykJaroszewicz / github-to-bitbucket
Created May 4, 2020 11:07 — forked from sangeeths/github-to-bitbucket
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone [email protected]:abc/myforkedrepo.git
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync [email protected]:def/originalrepo.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v

Set up remotes

setup local repo

mkdir myrepository
cd myrepository
git init

add bitbucket remote as "origin"

#Create bitbucket branch

##Create local branch

$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
  master
* sync