When I checkout, I get:
me@localhost# git checkout master D deps/example M deps/example2 Switched to branch "master"
The man page doesn't mention this cryptic output. What does it mean?
That's the output of git status ; git is showing you that after checking out master there are still uncommited changes to your working copy (one modified file and one deleted file). Check man git-status : M = modified A = added D = deleted R = renamed C = copied U = updated but unmerged.
-d --detach. Rather than checking out a branch to work on it, check out a commit for inspection and discardable experiments. This is the default behavior of git checkout <commit> when <commit> is not a branch name. See the "DETACHED HEAD" section below for details. --orphan <new-branch>
Git Checkout File Checking out a file is similar to using git reset with a file path, except it updates the working directory instead of the stage. Unlike the commit-level version of this command, this does not move the HEAD reference, which means that you won't switch branches.
The git status command displays the state of the working directory and the staging area. It lets you see which changes have been staged, which haven't, and which files aren't being tracked by Git.
That's the output of git status
; git is showing you that after checking out master
there are still uncommited changes to your working copy (one modified file and one deleted file).
Check man git-status
:
M = modified A = added D = deleted R = renamed C = copied U = updated but unmerged
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With