How to fork your own repo on BitBucket ?
I know how to fork another user repo from web interface, and I know how to clone my repo.
But how to fork your own repo on BitBucket and ease a future pull request workflow?
How to fork your own repo on BitBucket ?
I know how to fork another user repo from web interface, and I know how to clone my repo.
But how to fork your own repo on BitBucket and ease a future pull request workflow?
Go to your repository, and then go to Actions -> Fork.
If you have the new navigation enabled, then go to your repository, click on the + on the left navigation bar and then Get to work -> Fork this repository.
Also, make sure that forking is enabled in repository settings (for the existing repository).
First, create a new repository 'bar'. Next, clone the existing project 'foo':
$ git clone [email protected]:YOURNAME/foo.git bar
Next, edit your Git config file and replace the origin URL with your new URL:
$ cd bar
$ vim .git/config
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:YOURNAME/bar.git #replace foo with bar
Optionally add your original repo as an upstream source:
$ git remote add upstream [email protected]:YOURNAME/foo.git
Finally, push your new repository up to Bitbucket:
$ git push -u origin master
Now you can push/pull from your new repo (bar) as expected. You should also be able to merge upstream changes using the following command:
$ git fetch upstream
$ git merge upstream/master
credit: bitdrift
On bitbucket server, it does not seem to be an option to fork from your own personal repository. I ran into this trying to move a personal repository to a public location. Possible options:
Get someone else to fork it for you or use a different login if available.
Or
From the project settings, "Move" the repository to the public location, then fork the moved repository back to the original location.
© 2022 - 2024 — McMap. All rights reserved.
master-fork
link in repo properties – Orson