I have a Git repository at https://[email protected]/path/git.git.
This repository has a branch called feature/myFeature
, which I want to check out. I have run
git init
in the desired folder, and then, according to Bitbucket, I need to run
git fetch && git checkout feature/myFeature
However, I get the following error,
fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched.
I guess I need to specify the repository, but I don't know how exactly to do this, and at the same time specify the branch.
What should I do?
You need to add a remote first (git init
just created an empty local repo):
git remote add origin https://[email protected]/path/git.git
Then you can fetch and checkout the remote tracking branch
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With