1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-24 05:36:19 +02:00

37 lines
594 B
Bash
Raw Normal View History

2021-10-22 20:18:40 +11:00
#!/bin/sh
set -e
2022-01-26 16:46:54 +11:00
set -e
2021-10-22 20:18:40 +11:00
cd $1
git init
git config user.email "CI@example.com"
git config user.name "CI"
echo test1 > myfile1
git add .
git commit -am "myfile1"
echo test2 > myfile2
git add .
git commit -am "myfile2"
echo test3 > myfile3
git add .
git commit -am "myfile3"
echo test4 > myfile4
git add .
git commit -am "myfile4"
cd ..
2022-03-27 11:47:07 +11:00
git clone --bare ./repo origin
2021-10-22 20:18:40 +11:00
2022-03-27 11:47:07 +11:00
cd repo
2021-10-22 20:18:40 +11:00
# the test is to ensure that we actually can pull these two commits back from the origin
git reset --hard HEAD~2
2022-03-27 11:47:07 +11:00
git remote add origin ../origin
2021-10-22 20:18:40 +11:00
git fetch origin
git branch --set-upstream-to=origin/master master