forked from lvv/git-prompt
-
Notifications
You must be signed in to change notification settings - Fork 2
/
demo-script
executable file
·40 lines (40 loc) · 873 Bytes
/
demo-script
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
cd p/git-prompt
. ./git-prompt.sh
cd
test -d demo && rm -rf demo/
test -d ../demo && cd .. && rm -rf demo/
clear
: ------------------------------------------------------------------------
clear
mkdir demo
cd demo
git init
echo "1st line" > FOO
git add FOO
touch untracked.o
echo '*.o' >> .gitignore
git commit -q -m "1st line" FOO
git checkout -b test
echo "added 2nd line in test" >> FOO
git add FOO
echo "2nd in BAR" > BAR
git add BAR
echo "added 3nd line FOO" >> FOO
git add FOO
git commit -q -m "FOO moded, BAR added"
git checkout master
cat FOO
echo "now added 2nd line in master" >> FOO
git add FOO
git commit -q -m "2nd line"
git merge test
git cat-file -p test:FOO > FOO
git add FOO
git commit -q -m "merged"
cat FOO
git checkout HEAD^
cat FOO
git checkout HEAD
git clean -f
: ------------------------------------------------------------------------
cd ..