TN888
TN888

Reputation: 7739

Git - how to create branch equal to fork base

I have fork of one of the repos. I have got there edited master branch. I want to create new branch in my repostitory, which will be equal to master in orginal repo (this repo I created fork of). How can I do that? git branch newbraaanch origin/master gives be branch equal to master, but in my fork....

That is important. I have to finish my C++ project...

Upvotes: 1

Views: 413

Answers (1)

mystery
mystery

Reputation: 19513

Add the original repo as a remote:

git remote add foobar https://github.com/foo/bar

Then do a fetch:

git fetch foobar

Finally, branch:

git branch newbraaanch foobar/master

Upvotes: 2

Related Questions