Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding remote upstream to git repo on bit bucket

Tags:

git

bitbucket

In case of GitHub, I added a remote named upstream to pull in latest changes to my forked repo using:

git remote add upstream [email protected]:<original_author_name>/<productname>.git

Here, [email protected]:<original_author_name>/<productname>.git is displayed on my github dashborad, Once I forked the repo.

But in case of Bitbucket, I always see my forked repo location but not the original source from where I fork it from. Now how can I find the location of original repo which I could add as remote - upstream to pull in latest changes from original I forked?

like image 387
Tarun Avatar asked Jan 30 '12 10:01

Tarun


2 Answers

Simply add it this way:

git remote add upstream [email protected]:YOUR-PROJECT-NAME.git

Check out this article for more info: https://blogs.atlassian.com/2013/07/git-upstreams-forks/

like image 156
adardesign Avatar answered Sep 20 '22 23:09

adardesign


If that information (the upstream repo address from which you have forked your own BitBucket Git repo) is really not available anywhere, try at list a pull request.

The pull request screen should display the candidate upstream repo name (that you can click to see its address).

BitBucket pull request

like image 27
VonC Avatar answered Sep 21 '22 23:09

VonC