-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.sh
36 lines (26 loc) · 979 Bytes
/
init.sh
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
#!/bin/bash
# Run the git_2.0 executable with the init command
git_2.0 init
# Create a directory named "test_repo"
echo "File in root directory" > file0.txt
mkdir test_repo
cd test_repo
# Create some files and write content to them
echo "This is file1" > file1.txt
echo "This is file2" > file2.txt
echo "This is file3" > file3.txt
cd ..
# create the tree object
# Make a commit
git_2.0 commit-tree $(git_2.0 write-tree .) -m "Initial commit"
# git_2.0 write-tree .
# Modify one of the files and make another commit
cd test_repo
echo "This is an update to file1" >> file1.txt
# git_2.0 write-tree .
git_2.0 commit-tree $(git_2.0 write-tree .) -m "Updated file1"
# Modify another file and make a third commit
echo "This is an update to file2" >> file2.txt
git_2.0 commit-tree $(git_2.0 write-tree .) -m "Updated file2"
# Now you have a repository with multiple commits to test the checkout functionality
echo "Repository setup complete. You can now test other commands."