Error downloading branch in git

Asked

Viewed 144 times

1

I was working on a branch on my personal machine, and when I went to download it on the company machine, using the windows power shell, I got the following message:

PS projeto> git checkout -t origin/minha_branch
fatal: Cannot update paths and switch to branch 'minha_branch' at the same time.
Did you intend to checkout 'origin/minha_branch' which can not be resolved as commit?

1 answer

1

When you clone a project and are switching branches, you can only use git checkout <branch> without needing the -t, because git automatically fetches references and manages tracking.

If this keeps happening, see if your remotes are correct with the git remote -v and try to use the git fetch <seuRemote> and git remote update <seuremote> to update references, then use the same command again.

https://stackoverflow.com/questions/945654/git-checkout-updating-paths-is-incompatible-with-switching-branches

http://dianaarnos.com/pt/git-resolvendo-erro-cannot-update-paths/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.