I'm stuck at the following problem:
This is what I want:
- a git command, that I can use to show the 'US' changes
- it should work like status, (show what I did) in comparisation to the remote
This is what I tried:
- git diff [in JGit -> diffentry] with many options e.G. master..branchName
- I tried to find a git status cmd, that does work with 2 commits.
- I watched through the whole diffEntry[JGIT] methods to find a method to get my desired Output
I googled for JGit methods, that will show me my desired Output
To 1. -> The problem is : When I change a file on remote, the git diff command shows the file as 'M' for modified, but the user did not modified it, it may be true, but is not what I search
To 2. -> git Status is something I'd like to use, because it shows exactly what I want.... but only from index to head...
For what?
I want a list from all files that the User had modified/added/deleted so I can iterate through it and put head informations in every file, just before he pushes the file.
Hows the workflow?
I clone a branch, do N-commits and now I want to push. Every file in this N-commits must be modified. (and that's the Problem with this modified, if it's modified in the remote branch, but not locally, than I should not touch it with my script, but I have no way to differentiate between this two)
€dit: Additional Infos
git diff-index does nearly what I want. The problem: I need to filter only 'our' changes. So if a file is modified on remote, I dont want to see it. I want to see MY modified files.