I am looking for a way to have output in the same manner as ls-tree, but of my working directory. Whenever I run git ls-tree . it says fatal: Not a valid object name .
I am looking for a way to have output in the same manner as
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.
git ls-treeonly works with git refs, e.g.ls-tree HEADorls-tree 1.9.1Try
git ls-files. You probably want the-sand/or-mflags.As you point out,
git ls-files -swill list the files in the index (i.e. files that have been staged).In theory, you could mess with the index, run
git ls-files -s, then try restore it, e.g.Seems right, and worked in a simple test, but could eat all your files.