GIT how to get the list of files to be committed with relative path

Viewed 32

If I execute:

$ git status

I get

Changes to be committed:
 (use "git reset HEAD <file>..." to unstage)

modified:   ../../resources/dags/BROKEN_DAG.py
modified:   ../../resources/dags/BROKEN_DAG2.py

But

$ git diff --cached --name-only     

returns:

src/main/resources/dags/BROKEN_DAG.py
src/main/resources/dags/BROKEN_DAG2.py

How can I get something like this:

$ git diff --cached --name-only  --some-magic-option
../../resources/dags/BROKEN_DAG.py
../../resources/dags/BROKEN_DAG2.py

?

0 Answers
Related