-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgitAddAll_Commit_Push_KPAdhikari_leadersmeNow.sh
executable file
·81 lines (72 loc) · 1.61 KB
/
gitAddAll_Commit_Push_KPAdhikari_leadersmeNow.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
commitMessage="Update"
if [ $# -gt 0 ]; then
commitMessage=$1
elif [ $# -lt 1 ]; then
echo "Enter commit message in quotes"
exit 2
fi
echo 'commit message is: ' $commitMessage
echo ''
echo ''
echo ''
echo "========= Next I am executing 'git status' for adding all.======'"
echo ''
echo ''
echo ''
#exit 2
#jupyter-nbconvert --to slides slides.ipynb --reveal-prefix=reveal.js
#mv slides.slides.html index.html
#mkdir -p /tmp/workspace
#cp -r * /tmp/workspace/
#
# For git 'commit' and 'add' options, look at the following pages:
# https://git-scm.com/docs/git-commit
# https://git-scm.com/docs/git-add
#echo "running git status command.."
git status
echo ''
echo ''
echo ''
echo "========= Next I am executing 'git add -A' for adding all.======'"
echo ''
echo ''
echo ''
git add -A .
#git commit -am "Update"
#git checkout -B gh-pages
#cp -r /tmp/workspace/* .
#git add -A .
echo ''
echo ''
echo ''
echo "========= Next I am executing 'git status' again.======'"
echo ''
echo ''
echo ''
#echo "running git status command.."
git status
echo ''
echo ''
echo ''
echo "========= Next running 'git commit -am commitMessage' for adding all.======'"
echo ''
echo ''
echo ''
#git commit -am "Update"
git commit -am "${commitMessage}"
echo ''
echo ''
echo ''
echo "========= Finally running 'git push origin master' for adding all.======'"
echo ''
echo ''
echo ''
#git push origin master gh-pages
git push origin master
#git checkout master
#rm -rf /tmp/workspace
sleep 1s #units: s, m, h, d for sec (default), min, hour, day, so 4 = 4s
#printf "\n\n\n\"
echo -e "\n\n\n\n running 'git status' command.. \n\n"
git status