Skip to content

Commit 273c1f2

Browse files
committed
Added commit-script.sh
1 parent 2755705 commit 273c1f2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

commit-script.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
git add .
4+
5+
if git status | grep -q 'modified'; then
6+
status=$(git status | grep 'modified')
7+
modified_file=${status##*/}
8+
git commit -m "Updated ${modified_file}"
9+
elif git status | grep -q 'new file:'; then
10+
status=$(git status | grep 'new file:')
11+
added_file=${status##*/}
12+
git commit -m "Added ${added_file}"
13+
fi
14+
15+
git push

0 commit comments

Comments
 (0)