Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 3

Get changes from all commits pushed

Solved! Go to Solution.

Hi, thanks for reading.

 

I was wondering how i can identify the files that have been updated, i know how get this data for the last commit

(

git log -m -1 --name-only --pretty="format:" ${{ github.sha }}

) but what about if i push 3 commit.

I want to get the filename of all commits pushed on this workflow.

 

Example:

Here I need to get the modified files of test01, test02 and test03. It is the same push but in different commit

tt.JPG

 

Thanks

2 Replies
Highlighted
Commander Lvl 1
Message 2 of 3

Re: Get changes from all commits pushed

Hey, I think your best bet is to do the following: https://stackoverflow.com/questions/1552340/how-to-list-only-the-file-names-that-changed-between-two...

 

I do not think Git looks at the changes in files the same way you are trying to, meaning that you can't compare across pushes and need to compare across commits. 



*Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!*
Highlighted
Solution
Copilot Lvl 3
Message 3 of 3

Re: Get changes from all commits pushed

Thanks for your reply @logankilpatrick

 

 

After battling I have found a useful solution.

 

      - uses: actions/checkout@v2
        with:
          fetch-depth: 0

 

git diff --name-only ${{ github.event.before }} ${{ github.sha }}