Get list of changed files in the working directory

3

When you run the git diff command on the terminal, a window opens displaying the contents of the files with their changes. From there I can know which files have changed. The problem with this method is that to know which files have been changed, I need to go to the end of the last file presented.

I need a simpler feature. A feature that shows only the name of the changed files.

What is the command used to list files that have been changed but not commented out?

    
asked by anonymous 26.05.2015 / 16:25

3 answers

6

I have the impression that you just want the modified files. Without the "untracked" or "staged" files. In this case use

git ls-files --modified

or

git ls-files -m

obs: The files in the index have not been commented yet. But it's unclear if you want to list those files. As your example is the output of git diff I'm guessing not.

    
26.05.2015 / 16:53
2

The command to see the changed files that were not taken is git status , as shown below:

Inthelinkbelow,youwillfindmoreinformationaboutsavingchangestotherepositoryandcheckingthestatusofyourfiles:

Essential Git - Recording Changes to the Repository

    
26.05.2015 / 16:30
0

The command to display the repository status listing all changed files and new files (untracked files) is:

git status

    
26.05.2015 / 16:27