How can I see in my local repository a recently cr

2019-07-11 21:16发布

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?

2条回答
家丑人穷心不美
2楼-- · 2019-07-11 22:04

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

查看更多
三岁会撩人
3楼-- · 2019-07-11 22:08
git fetch
git checkout brancTest
查看更多
登录 后发表回答