Skip to content

Instantly share code, notes, and snippets.

Last active March 28, 2022 18:50
What would you like to do?
Bash create git repo for CAd files
# A bash function that will create a new git repo and configure the
# Usage: Add this to your ~/.bashrc or ~/.bash_profile or ~/.zshrc files
function f360 {
if [[ -z "$1" ]]; then echo "Usage: f360 foobar"; return 1; fi
if [[ ! -d "${_basepath}" ]]; then echo "${_basepath} doesn't exist"; return 1; fi
if [[ -d "${_basepath}/$1" ]]; then echo "Directory ${_basepath}/${1} already exists"; return 1; fi
echo "Creating ${_basepath}/${1}"
mkdir $_basepath/$1
cd $_basepath/$1
echo "running git init"
git init
echo "running git config"
git config <redacted>
git config "Spencer Owen"
#TODO: Create github repo
# git clone
#git submodule update --init
# rm CAD/*
# rm photos/*
# make clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment