How can I show the files git checkout adds/modifies/deletes in my working directory when I switch branches?
How can I show the files git checkout adds/modifies/deletes in my working directory when
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t believe that there is any “verbose”-like option you can add to the
git checkout <branch>command to output this information. However, after the successful checkout, you can run:The output from that command will indicate by the letter in the first column whether the file was deleted (
D), added (A), modified (M), etc. with respect to the previous commit you were at.As a possibly helpful additional point, note that when you switch branches, git will attempt to preserve local modifications to your files that haven’t yet been committed. If this switch of branch wouldn’t clobber those changes, they will be indicated immediately on the terminal immediately after the checkout such as: