feat(git): commit reads message and accepts files to commit
This commit is contained in:
parent
8f6510c1f4
commit
2b7bc58e47
1 changed files with 3 additions and 5 deletions
8
git.sh
8
git.sh
|
@ -9,8 +9,6 @@ command=$1
|
||||||
journal_dir="${notes_dir}/Journal"
|
journal_dir="${notes_dir}/Journal"
|
||||||
month_dir=$(date +"%m %b")
|
month_dir=$(date +"%m %b")
|
||||||
|
|
||||||
getopts "t" typora; #check if -t flag is given
|
|
||||||
|
|
||||||
if [ "$1" = "stat" ]; then
|
if [ "$1" = "stat" ]; then
|
||||||
{
|
{
|
||||||
git add .
|
git add .
|
||||||
|
@ -22,9 +20,9 @@ if [ "$1" = "stat" ]; then
|
||||||
elif [ "$1" = "commit" ]; then
|
elif [ "$1" = "commit" ]; then
|
||||||
{
|
{
|
||||||
git add .
|
git add .
|
||||||
git status
|
read -p "Message: " message
|
||||||
git commit -m "$2"
|
git commit -m "$message" $2 $3 $4 $5 $6 $7 $8 $9
|
||||||
} || {
|
}|| {
|
||||||
# Report; TODO: write log
|
# Report; TODO: write log
|
||||||
echo ">>> Commit failed"
|
echo ">>> Commit failed"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue