Git - push a specific commit to a new repo
Developer A was previously push everything to my-repo, eventually developer B created a new repo and clone all commits from old repo.
Developer B doesn’t inform A, thus A continue to work on old repo.
Now, B request A to push the latest commit to the new repo
First of all, add the new repo URL to the project
1 | cd /path/to/project |
Then now A can push a specific commit to the new repo
1 | $ git push neworigin 7300a6130d9447e18a931e898b64eefedea19544:master |
neworigin
refer to the new URL added just now7300a6130d9447e18a931e898b64eefedea19544
is the commit hashmaster
is branch in remote (Bitbucket)
References: