-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgit_commit.sh
More file actions
executable file
·33 lines (22 loc) · 858 Bytes
/
git_commit.sh
File metadata and controls
executable file
·33 lines (22 loc) · 858 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
#!/bin/bash
#set -e
# change a commit comment
# git commit --amend -m "more info"
# git push --force origin
# checking if I have the latest files from github
echo "Checking for newer files online first"
git pull
# Below command will backup everything inside the project folder
git add --all .
# Give a comment to the commit if you want
echo "####################################"
echo "Write your commit comment!"
echo "####################################"
read input
# Committing to the local repository with a message containing the time details and commit text
git commit -m "$input"
# Push the local files to github
git push
echo "################################################################"
echo "################### Git Push Done ######################"
echo "################################################################"