So I'm storring on my github all the differences I get on a json file during time ( I call an api that updates each time the json and only store the differences). To give you an idea ; It's the changes of availability, either an id is available or not. What I'm trying to do now : I want to get the content of each commit in a json file in my local machine. SO later I can loop through all the json files in sequence using nodejs or python and then generate a CSV with the data that interest me.
Thank you for your help,
The fourth line shows you symbol @@ and symbols ahead of it. They are called chunks. Chunks in git diff define the change' summary. In our image below the following chunk can be seen @@ -1,2 +1 @@ This means that lines one and two were changed in the first file and line one was changed in the second file.
Comparing changes with git diff Diffing is a function that takes two input data sets and outputs the changes between them. git diff is a multi-use Git command that when executed runs a diff function on Git data sources. These data sources can be commits, branches, files and more.
The main difference between the commands is that git diff is specially aimed at comparisons, and it's very powerful at that: It can compare commits, branches, a single file across revisions or branches, etc. On the other hand, git status is specifically for the status of the working tree.
The git diff command helps you see, compare, and understand changes in your project. You can use it in many different situations, e.g. to look at current changes in your working copy, past changes in commits, or even to compare branches.
There is a couple of Gists adding support of log2json
command to git
:
log2json
command implementation--name-only
parameterReferences:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With