-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_test_repo.sh
More file actions
executable file
·53 lines (46 loc) · 1.29 KB
/
setup_test_repo.sh
File metadata and controls
executable file
·53 lines (46 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
DEST_DIR=$1
# setup the git repo
mkdir -p $DEST_DIR
cd $DEST_DIR
git init
touch README.md
# first commit by user1
git config user.name "user1"
git config user.email "user1@test.com"
echo "# Test Repo by user1 in master" >> README.md
git add README.md
git commit -m "first"
# second commit by user2
git config user.name "user2"
git config user.email "user2@test.com"
echo "# Test Repo by user2 in master" >> README.md
git add README.md
git commit -m "second"
# third commit in branch1 by user1
git checkout -b branch1
git config user.name "user1"
git config user.email "user1@test.com"
echo "# Test Repo by user1 in branch1" >> README.md
git add README.md
git commit -m "third"
# fourth commit in branch1 by user3
git config user.name "user3"
git config user.email "user3@test.com"
echo "# Test Repo by user3 in branch1" >> README.md
git add README.md
git commit -m "fourth"
# fifth commit in master by user3
git checkout master
git config user.name "user3"
git config user.email "user3@test.com"
echo "# Test Repo by user3 in master" >> README.md
git add README.md
git commit -m "fifth"
# sixth commit in master by user4
git checkout master
git config user.name "user4"
git config user.email "user4@test.com"
echo "# Test Repo by user4 in master" > OTHER.md
git add OTHER.md
git commit -m "sixth"