How to checkout without modifying files?
Is there a git command that can do the following things?
~/target-dir (some-branch)$ mkdir /tmp/tmp-target-dir
~/target-dir (some-branch)$ cp -r * /tmp/tmp-taregt-dir
~/target-dir (some-branch)$ git checkout -f master
~/target-dir (master)$ cp -r /tmp/tmp-target-dir/* .