Created
April 19, 2015 12:49
-
-
Save 3F/48dea90aae98ddb64d3a to your computer and use it in GitHub Desktop.
Deprecated example of how to get changes between revisions for SCM - git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: 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