Skip to content

Instantly share code, notes, and snippets.

@psd
Created May 21, 2024 15:55
Show Gist options
  • Save psd/bdacd46ca9f525385f838db9486d4873 to your computer and use it in GitHub Desktop.
Save psd/bdacd46ca9f525385f838db9486d4873 to your computer and use it in GitHub Desktop.
Finding old versions of a deleted file
(green-belt-collection) $ git blame --date=iso $(git log -2 --oneline -- collection/endpoint.csv | tail -1 | cut -d' ' -f1) collection/endpoint.csv
^fde75b2 (Paul Downey 2021-05-28 14:56:37 +0100  1) endpoint,endpoint-url,parameters,plugin,entry-date,start-date,end-date
05167dc5 (Paul Downey 2022-03-09 15:51:04 +0000  2) 21f6ac0160488dfdab4fae54bea1940ec2827e9c80d3b8df7ea73a45229c000f,http://maps.communities.gov.uk/geoserver/dclg_inspire/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=dclg_inspire%3AEngland_Green_Belt_2019-20_WGS84&outputFormat=GML3,,wfs,2021-10-27T06:06:33Z,,
05167dc5 (Paul Downey 2022-03-09 15:51:04 +0000  3) cbe952dd437d085d8c630d86632924693bac236c4fbad92cfdb623db3313e564,http://maps.communities.gov.uk/geoserver/dclg_inspire/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=dclg_inspire%3AEngland_Green_Belt_2018-19_WGS84&outputFormat=GML3,,wfs,2021-10-27T07:07:14Z,,
05167dc5 (Paul Downey 2022-03-09 15:51:04 +0000  4) 5cf30af559859b8e01088a0765f5864115ff3fe5504508168f10429fe38c383f,http://maps.communities.gov.uk/geoserver/dclg_inspire/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=dclg_inspire%3AEngland_Green_Belt_2017-18_WGS84&outputFormat=GML3,,wfs,2021-10-27T08:08:07Z,,
05167dc5 (Paul Downey 2022-03-09 15:51:04 +0000  5) cfb150d6d575fc78562b43faa7483d62cce71b80ad16779320a879f2626eff43,http://maps.communities.gov.uk/geoserver/dclg_inspire/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=dclg_inspire%3AEngland_Green_Belt_2016-17_WGS84&outputFormat=GML3,,wfs,2021-10-27T08:08:15Z,,
05167dc5 (Paul Downey 2022-03-09 15:51:04 +0000  6) 48b3108adbdd0c3838dc1859038dac22fc2034eb40e60c4750e38d1e2a420d22,http://maps.communities.gov.uk/geoserver/dclg_inspire/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=dclg_inspire%3AEngland_Green_Belt_2015-16_WGS84&outputFormat=GML3,,wfs,2021-10-27T08:08:24Z,,
05167dc5 (Paul Downey 2022-03-09 15:51:04 +0000  7) 14d9d98a67683dfa834cc9e7f50c9fed515df298d3bb17f776d73aa9e58f6b23,http://maps.communities.gov.uk/geoserver/dclg_inspire/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=dclg_inspire%3AEngland_Green_Belt_2014-15_WGS84&outputFormat=GML3,,wfs,2021-10-27T08:08:25Z,,
05167dc5 (Paul Downey 2022-03-09 15:51:04 +0000  8) 58f8ec82cc59a963cc9915e12eda358738d31b348413fc79cb19b5fe5b7ad930,http://maps.communities.gov.uk/geoserver/dclg_inspire/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=dclg_inspire%3AEngland_Green_Belt_2013-14_WGS84&outputFormat=GML3,,wfs,2021-10-27T08:08:27Z,,
05167dc5 (Paul Downey 2022-03-09 15:51:04 +0000  9) b08755d2f6714071b7385b03938eadb2044149eee99b0b0696bbf5f90c65ce14,https://raw.githubusercontent.com/digital-land/green-belt-collection/main/data/green-belt-core.csv,,,2021-10-27T19:19:56Z,,
4509090e (Paul Downey 2022-09-14 17:29:35 +0100 10) b04c507f53aa0e0624b5f529c3335413f1ea384674533f910ba5ad24baa0464b,http://maps.communities.gov.uk/geoserver/dclg_inspire/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=dclg_inspire%3AEngland_Green_Belt_2020-21_WGS84&outputFormat=GML3,,wfs,2022-09-13T10:10:09:02Z,,
(green-belt-collection) $ git blame --date=iso $(git log -2 --oneline -- collection/resource.csv | tail -1 | cut -d' ' -f1) collection/resource.csv | sed -e 's/,.*$//' -e 's/^.*) //'
resource
070d2a4b694ff9de4b3616f6a9b1703197d707a849a0caea220b6e4ad04be81b
0e2cc42c6fcd06aebb3717e9a13cefbaa5a3c6590ba044d8812e25eda3e98ebb
111622fd0f0d9dd506764bdc361b45d2f7fb1c7a7297e2310109d662020a26b7
26dfbfa718b56dbf76a8d2182859371073a63332600a8860c8bd84fcc09cbbe1
5d462aa86f638be20e7fe0d531434f3bf10761dee2dbcf8b5c7e11532f8fc7d1
6f74ea15b5cd53bc752d23a6d5a1f25388bd330c9c7617f97bf921d1b174da41
78d688e8977bcfeb00ce80679b2443b836b1ae275d87c6c0b8254a54f941efb1
7f9b19c1c5b08e6619b164ef2e18812a8199ae150e8303072a41df89e1954022
983d409a0aedfa6efe9d8ba0a66d154566fe1ab826e4f09a9bd5e9339c1d06a5
bcc3680ca22f1e011cf1e1484d62f86f9ddf5d6ebfbd15d2c6a770f56b454440
c664927a77fa482d9671464599f0c007218793db3bb68b17e45f3dd8bdb8e85c
c8d32155174262eec375bcbac5b2c89ed43e27a8946f999526c6b453095b2b8c
d7f1e9256d7001793b0f7004fa741e205f988ad24a1d60cc28970f8334a355a5
ebf46d50cde4bdd1fec04890e12eebc7158983ab24a7bf33c0469a06cf902552
f099d2b394eae7a6f0c12957ec55324a01346dd87d914c4b4b61aeb4206ea82d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment