I need some help how can I edited this code from a shell script to batch script, since i want to run it also in windows.
 #!/bin/bash
 commit_limit='4'
 log=`git show HEAD~$commit_limit --pretty=format:"%H" --no-patch`
 echo $log > .git/info/grafts
 git filter-branch -f -- --all
 rm .git/info/grafts
 git update-ref -d refs/original/refs/heads/master  
 git reflog expire --expire=now --all
 git gc --force --prune=now --aggressive
 git push --force origin $branch
i tried this but it give me an output "H" instead of "9b027aaccb996ae4895e4dfb428c5e6e24870e68"
SET commit_limit=4
git show HEAD~%commit_limit% --pretty=format:"%H" --no-patch
pause
"%%H"in batch file.