Add scripts, configurations, docs from borgcube

This commit is contained in:
Martin Blazik
2020-08-13 11:06:41 +02:00
parent fd7e36a457
commit 7f8b5ae43b
15 changed files with 207 additions and 3 deletions

24
bin/git-reset-master Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
current_branch=$(git rev-parse --abbrev-ref HEAD)
git_workdir=$(git rev-parse --show-toplevel)
echo -n "CHECK master branch: "
if [[ "$current_branch" != "master" ]]; then
echo "BAD branch $current_branch"
exit 1
fi
echo "OK"
echo -n "CHECK root workdir: "
if [[ "$git_workdir" != "$PWD" ]]; then
echo "BAD"
exit 2
fi
echo "OK"
echo
echo "git fetch"
git fetch
echo "git reset --hard origin/master"
git reset --hard origin/master