2018-02-26 02:41:29 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
if [[ "--help" == "${1}" ]]; then
|
|
|
|
echo "bash ./sgit user.email commit"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -z "${2}" ]]; then
|
|
|
|
echo "Bitte email und commit angeben!!!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
push="${3}"
|
|
|
|
[[ -z "${push}" ]] && push="origin"
|
|
|
|
|
2018-09-03 01:06:28 +02:00
|
|
|
branch="${4}"
|
|
|
|
[[ -z "${branch}" ]] && branch="master"
|
|
|
|
|
2018-02-26 02:41:29 +01:00
|
|
|
git config --global core.editor "nano"
|
|
|
|
git config --global user.email "${1}"
|
|
|
|
git config --global user.name "${1}"
|
|
|
|
git config --global push.default simple
|
|
|
|
git status
|
|
|
|
git add --all
|
|
|
|
git commit --all -m "${2}"
|
|
|
|
git pull
|
|
|
|
git show
|
2018-09-03 01:06:28 +02:00
|
|
|
git push "${push}" "${branch}"
|
2018-02-26 02:41:29 +01:00
|
|
|
git status
|