Added Git Functions
This commit is contained in:
parent
c929b4af5f
commit
4f847b0dd1
@ -43,6 +43,24 @@ alias get-nordserverlist="wget https://downloads.nordcdn.com/configs/archives/se
|
|||||||
|
|
||||||
alias wireshark-pfsense="sudo su -c 'wireshark -k -i <(ssh root@192.168.0.3 -p 2222 tcpdump -i lagg0 -U -w - )'"
|
alias wireshark-pfsense="sudo su -c 'wireshark -k -i <(ssh root@192.168.0.3 -p 2222 tcpdump -i lagg0 -U -w - )'"
|
||||||
|
|
||||||
|
# Git Functions
|
||||||
|
function gpm() {
|
||||||
|
if [ "$(grep -c "[branch "master"]" .git/config )" -gt 0 ]; then
|
||||||
|
git push origin master
|
||||||
|
elif [ "$(grep -c "[branch "main"]" .git/config )" -gt 0 ]; then
|
||||||
|
git push origin main
|
||||||
|
else
|
||||||
|
echo "fatal: not a git repository (or any of the parent directories): .git"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function gac() {
|
||||||
|
echo "Log Message: "
|
||||||
|
read logmessage
|
||||||
|
git add --all && git commit --allow-empty-message -m "$logmessage"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Updates packages from all sources
|
# Updates packages from all sources
|
||||||
function update() {
|
function update() {
|
||||||
if command -v snap >/dev/null; then
|
if command -v snap >/dev/null; then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user