问题
I am just trying to import the branch 'brancTest' recently created in Bitbucket into my local repository.
This is what I am doing git checkout -b 'brancTest' origin/brancTest
And I get this message:
fatal: 'origin/brancTest' is not a commit and a branch 'brancTest' cannot be created from it
I am in my develop an git status give me this:
git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working tree clean
When I do git branch -a
I can't see 'brancTest' in the list of all branches.
How to import that branch?
回答1:
git fetch
git checkout brancTest
回答2:
Try "git remote -v" to verify if any remote named 'origin' listed in it.
If you don't find 'origin', that is the remote (which should have been created by default while cloning a repo) is missing.
Add origin again in that case using below:
git remote add origin url/to/your/fork
来源:https://stackoverflow.com/questions/47142602/how-can-i-see-in-my-local-repository-a-recently-created-branches-in-the-bitbucke