Skip to content

Instantly share code, notes, and snippets.

@beyondlimits
Last active December 22, 2018 22:47
Show Gist options
  • Save beyondlimits/e208eadae647c4fa733f9b870d775b46 to your computer and use it in GitHub Desktop.
Save beyondlimits/e208eadae647c4fa733f9b870d775b46 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
(
mkdir test
pushd test
git init
echo 'Hello, World!' > testfile
git add testfile
GIT_AUTHOR_DATE='2012-12-21 18:15:43' \
GIT_COMMITTER_DATE='2012-12-22 11:23:18' \
TZ='Europe/Warsaw' \
git \
-c user.name=TheWild \
-c user.email=thewild@example.org \
commit -m 'Initial commit.' --author 'TheWild <thewild@example.org>'
) > /dev/null
git -C test rev-parse HEAD # aa29c5c76be95bd75f8bfb60f0fcbcdae092ce03
rm -rf test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment