I’m currently struggling with Git and my idea of finding all path(s) for a certain Pull request.
In Azure devops when I create a PR from branch A to branch B I’m presented with all the files that have been changed and there respective paths, but now I need to figure out the same in a different pipeline but that’s where I get stuck.
When I run git diff --name-only $(Build.SourceVersion)..HEAD
I get no return at all, but I thought while checking the difference between the commit ID (build.sourceVersion) against HEAD I would get all commits (same i got in my PR) and with those I could make a loop using the command git log --oneline --name-only -m -n 1 <COMMITID>
If I would use it like git log --oneline --name-only -m -n 1 $(Build.SourceVersion)
I do get paths but also of any commit which came before which I don’t want!
I would only need the ones from the white markings the rest is not needed
1