@adswebwork: I concur. All the opposite answers suggest reverting to a earlier state and losing modifications produced domestically from the detached head condition. As I claimed in @ralphtheninja's response, git checkout path/to/foo could conflict with git checkout some-department, so it would be improved to work with git checkout -- path/to/foo https://paxtoncdfnr.blogocial.com/the-fact-about-for-you-that-no-one-is-suggesting-74585440