I am trying to identify the delta changes whenever I commit something to gitlab. The commits can be greater than one.
I am trying to find answer similar to below question Copy differing files between two commits to a specific folder using Git
The solution described in above question says it should give me delta changes only but i am getting the whole files. I require delta changes only.
eg If i execute below commands
git clone <repository location>
git checkout <SHA of old commit>
git diff --name-only <SHA of old commit> <SHA of newer commit> | xargs git checkout-index -f --prefix='C:\changes\'
I get the changed file in folder location C:\changes\. But i need the changed files with delta changes only and not the whole file content. Not sure what i am doing wrong.
Any suggestions would really help.
Thankyou.
In shell you can do git diff first-commit-sha1..last-commit-sha2
to get changes between sha1 and sha2.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.