1

I have forked(origin) a repo from another repo (Upstream).

What I want to do is,

  1. Creating a local branch called UnitTest from Upstream/develop_clean branch.
  2. Push it to a remote branch called UnitTest

What I have done is

git checkout -b UnitTest upstream/develop_clean
git push -u origin UnitTest

But it throws a fatal error like

fatal: Cannot update paths and switch to branch 'UnitTest' at the same time. Did you intend to checkout 'upstream/develop_clean' which can not be resolved as commit?

I can not figure it out. Whats the problem here? Is there any other ways to do the same thing as describe above?

NeoCoder
  • 101
  • 1
  • 8
  • 5
    Possible duplicate of ["Cannot update paths and switch to branch at the same time"](https://stackoverflow.com/questions/22984262/cannot-update-paths-and-switch-to-branch-at-the-same-time) – mvrma Jan 09 '18 at 10:48

1 Answers1

0

'upstream/develop_clean' is not getting resolved, you might need to check your remotes :

git remote -v

Then fetch origin :

git fetch origin
nbirla
  • 600
  • 3
  • 14
  • git remote -v outputs `origin https://github.com/nalam-nmef/NextGenTPR.git (fetch) origin https://github.com/nalam-nmef/NextGenTPR.git (push) upstream https://github.com/NMEF/NextGenTPR.git (fetch) upstream https://github.com/NMEF/NextGenTPR.git (push) ` – NeoCoder Jan 09 '18 at 11:01