Skip to content

Instantly share code, notes, and snippets.

@amon-ra
Last active May 11, 2018 11:11
Show Gist options
  • Save amon-ra/3b242d7d1dc829152ca00c92714e42cc to your computer and use it in GitHub Desktop.
Save amon-ra/3b242d7d1dc829152ca00c92714e42cc to your computer and use it in GitHub Desktop.
Sync local gitea repo with ispconfig web host
#!/bin/bash
#https://gist.github.com/amon-ra/3b242d7d1dc829152ca00c92714e42cc
#https://gist.github.com/amon-ra/46409526aa3a4cadb308b67fba68d215
OWNER="$(stat -c "%U:%G" $1)"
git --work-tree=$1 --git-dir=$2 checkout -f
chown -R $OWNER $1/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment