This commit is contained in:
2026-01-13 13:33:57 +04:00
parent f45cbb879c
commit cb76533758
2 changed files with 15 additions and 0 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
push
.gitcommit.txt

View File

@@ -25,3 +25,17 @@ ginit() {
git commit -m "Initial commit"
git push --set-upstream origin main
}
gpush() {
if [ -f "$PWD/.gitcommit.txt" ]; then
local commit="$(tail -n 1 .gitcommit.txt)"
local branch="$(git branch --show-current 2>/dev/null || git rev-parse --abbrev-ref HEAD 2>/dev/null)"
git add .
git commit -m "$commit"
git push origin "$branch"
else
echo "file no"
fi
}