Skip to content

Instantly share code, notes, and snippets.

@3F
Created April 19, 2015 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 3F/48dea90aae98ddb64d3a to your computer and use it in GitHub Desktop.
Save 3F/48dea90aae98ddb64d3a to your computer and use it in GitHub Desktop.
Deprecated example of how to get changes between revisions for SCM - git
: Deprecated example of how to get changes between revisions for SCM - git
@echo off
: Compare from sha1
set fromsha1=73fa2e6a9c01f70c09fd2ed7eb965ee59b924580
: Result into
set fout=Changes.diff
: Header for result
set dateTimeNow=%DATE% %TIME%
FOR /F %%i IN ('git rev-parse HEAD') DO set curSha1=%%i
set header=[ %dateTimeNow% :: compared with SHA-1: %curSha1% ]
echo %header% > %fout%
echo ______________ >> %fout%
: Compare
git diff --diff-filter=DMRTUXB --no-prefix %fromsha1% >> %fout%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment