-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgit-example.sh
More file actions
33 lines (27 loc) · 751 Bytes
/
git-example.sh
File metadata and controls
33 lines (27 loc) · 751 Bytes
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
REPO_NAME="git-example"
# delete the temp repo
rm -rf $REPO_NAME
# Initialize a empty repository
git init $REPO_NAME
cd $REPO_NAME
# make some commits
echo "Adding and Commiting some files..."
read -p "Press enter to continue"
echo "Erster Test\nLets see..." >> test.txt
echo "Erster Test\nLets see..." >> test2.txt
git add .
git commit -m "Erster commit"
# make some more commits
echo "\nEditing a file and commiting it"
read -p "Press enter to continue"
echo "Zweiter Commit Test\nLets see..." >> test2.txt
git add .
git commit -m "Zweiter commit"
# log the commits
echo "\ngit log"
read -p "Press enter to continue"
git log
# pretty log the commits
echo "\ngit log --pretty=oneline"
read -p "Press enter to continue"
git log --pretty=oneline