简体   繁体   中英

Git can't checkout to master

So when I try to switch to master I get this:

⌘ ~/Documents/foo/foo/ (foo-550) git checkout master
error: The following untracked working tree files would be overwritten by checkout:
    application/models/foo_nrds_model.php
Please move or remove them before you can switch branches.
Aborting


⌘ ~/Documents/foo/foo/ (foo-550) git status
On branch foo-550
Your branch is up-to-date with 'origin/foo-550'.

nothing to commit, working directory clean

I also want to mention that I never switched to master yet, only creating branches from the qa branch, what should I do in this case?

Seems like you have done some changes in branch and "foo-550" but you have not pushed those changes.

So, when you are trying to change your branch you are getting this error.

If you still have the problem please provide the output of command

git diff

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM