Skip to content

Instantly share code, notes, and snippets.

View janniklorenz's full-sized avatar

Jannik Lorenz janniklorenz

View GitHub Profile
#!/bin/bash
# Create path to repo
mkdir -p "$1.git"
# Create Bare Repo
git --git-dir "$1.git" --bare init
#!/bin/bash
# Create path to repo
mkdir -p "$1"
# Create Bare Repo
git -C "$1" init
#!/bin/bash
host=$(ssh git@host.com "~/newRepo.sh $1")
./newLocalRepo.sh $1
git -C "$1" remote add "host" $host
#!/bin/bash
# Create path to repo
mkdir -p $(dirname $1)
# Create Bare Repo
git clone "https://github.com/$1" --bare "$1.git"
#!/bin/bash
CUR_DIR=/mnt/data/Pools/Git/Public/
export GIT_ASKPASS=/bin/echo
for i in $(ls -R --directory --color=never */*.git); do
git -C "$CUR_DIR$i" fetch origin
done
#!/bin/bash
#rsync -a --progress --exclude "Git/.*" /mnt/data/Pools/ /mnt/backup/Pools/
function copyBackup {
if [ -b /dev/disk/by-uuid/$1 ]
then
{
sudo mount /dev/disk/by-uuid/$1 /mnt/backup