-
Notifications
You must be signed in to change notification settings - Fork 101
Create a test git repo snippet
Joris Roovers edited this page Jul 29, 2017
·
1 revision
# Create the repo
cd /tmp
reponame=$(date +gitlint-test-%Y-%m-%d_%H-%M-%S)
git init $reponame
cd $reponame
# Do some basic config
git config user.name gitlint-test-user
git config user.email [email protected]
git config core.quotePath false
git config core.precomposeunicde true
# Add a test commit
echo "test 123" > test.txt
git add test.txt
git commit -m "test commit"
# Let the user know
echo "Created /tmp/$reponame"
echo "Hit key up to access 'cd /tmp/$reponame'"
history -s cd "/tmp/$reponame"