Skip to content

Instantly share code, notes, and snippets.

@victorcreed
Created March 31, 2013 08:30
Show Gist options
  • Save victorcreed/5279984 to your computer and use it in GitHub Desktop.
Save victorcreed/5279984 to your computer and use it in GitHub Desktop.
my dot file to copy current git project. sync this folder to any cloud service
mk_setup_backup(){
if [ "$#" -ne 1 ]
then
echo "Error!!!"
exit
else
mkdir -p $HOME/local_backups/$1
d_path=`pwd`
cd $HOME/local_backups/$1
git init --bare
echo "$d_path"
cd $d_path
git remote add local-backup /home/victor/local_backups/$1
# cd /home/victor/Ubuntu\ One/local_backups/$1
echo "$1"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment