From: Luc Van Oostenryck Date: Fri, 07 Jul 2017 12:37:28 GMT Subject: bug during checkout of remote branch and uncommited changes ? Message-ID: <20170707123727.dgd5rub2ycrg525y@ltop.local> Hi, Lately I've been caught several time with a problem which, to me, is a bug. It can easily be reproduced, so I think It's very possible it has already been reported. The problem arise when trying to checkout a branch while having some uncommited changes. The scenario is the following: $ git status M afile.c $ git remote add $ git fetch remote: Counting objects: 7, done. remote: Compressing objects: 100% (6/6), done. remote: Total 7 (delta 5), reused 3 (delta 1) Unpacking objects: 100% (7/7), done. From * branch -> FETCH_HEAD * [new branch] -> / $ git co error: Your local changes to the following files would be overwritten by checkout: afile.c Please commit your changes or stash them before you switch branches. Aborting $ git reset --hard patching file afile.c $ git co fatal: Not tracking: ambiguous information for ref refs/remotes// What can be ambiguous here? Strangely, trying a second time, succeed: $ git co Previous HEAD position was ... Switched to branch '' -- Luc Van Oostenryck