forked from trayburn/GITLabs
-
Notifications
You must be signed in to change notification settings - Fork 12
/
lab2.sh
47 lines (38 loc) · 793 Bytes
/
lab2.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
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
. ./clean-all.sh
mkdir ./lab2
cd ./lab2
git init
# Setup one commit on master
touch README
git add .
git commit -am "First Commit"
# branch to working
git checkout -b working
# do work & commit
echo "fizz buzz" > file1.txt
git add .
git commit -am "working commit1"
echo "fizz buzz" > file2.txt
git add .
git commit -am "working commit2"
echo "fizz buzz" > file3.txt
git add .
git commit -am "working commit3"
# back to master
git checkout master
# branch to feature
git checkout -b feature
# do work & commit
echo "Hello World" > file1.txt
git add .
git commit -am "bugfix commit1"
echo "Hello World" > file2.txt
git add .
git commit -am "bugfix commit2"
echo "Hello World" > file3.txt
git add .
git commit -am "bugfix commit3"
# back to master
git checkout master
clear