mirror of
https://github.com/1xtier/.dotfiles.git
synced 2026-03-17 02:47:56 +00:00
add lib
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
push
|
push
|
||||||
|
.gitcommit.txt
|
||||||
|
|||||||
@@ -25,3 +25,17 @@ ginit() {
|
|||||||
git commit -m "Initial commit"
|
git commit -m "Initial commit"
|
||||||
git push --set-upstream origin main
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user