-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathgit-v2.sh
More file actions
executable file
·27 lines (18 loc) · 778 Bytes
/
git-v2.sh
File metadata and controls
executable file
·27 lines (18 loc) · 778 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
#!/bin/bash
# checking if you 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 -u origin master
echo "################################################################"
echo "################### Git Push Done ######################"
echo "################################################################"