Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git checkout: what does this weird output mean?

Tags:

git

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?

like image 707
mwt Avatar asked Feb 09 '11 19:02

mwt


People also ask

What does M mean in git checkout?

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.

What is D in git checkout?

-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>

What happens when you git checkout a file?

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.

What git status means?

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.


1 Answers

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 
like image 92
meagar Avatar answered Sep 27 '22 02:09

meagar