Skip to content

Commit

Permalink
add scripts that help user in commiting there changes to git in one cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
JeelDobariya38 committed Jun 15, 2024
1 parent ddf19c5 commit 6033003
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
26 changes: 25 additions & 1 deletion code/git/autocommit.bash
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
echo "Hello Coding Notes"
# !/bin/bash

# Staging Files
echo "Staging Files Changes...."
git add .

echo ""

# Commiting Change
read -p "Enter a commit message: " message

echo "Commiting the change..."
git commit -m "$message"

echo ""

# Pushing them to Remote
read -p "Want to push it to remote (y/n): " res

if [ $res -eq "y" ]; then
echo "Pushing your change...."
git push
fi

echo ""
26 changes: 25 additions & 1 deletion code/git/autocommit.ps1
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
echo "Hello Coding Notes"
# !/bin/bash

# Staging Files
Write-Host "Staging Files Changes...."
git add .

Write-Host ""

# Commiting Change
$message = Read-Host "Enter a commit message"

Write-Host "Commiting the change..."
git commit -m "$message"

Write-Host ""

# Pushing them to Remote
$res = Read-Host "Want to push it to remote (y/n)"

if ($res -eq "y") {
Write-Host "Pushing your change...."
git push
}

Write-Host ""

0 comments on commit 6033003

Please sign in to comment.