Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
SOURCE_REPO="/local/path/to/source/repo"
REMOTE_NAME="github"
REMOTE_PATH="https://github.com/username/repo.git"
REMOTE_BRANCH="master"
# Prepare source repo.
cd ${SOURCE_REPO}
find . -not \( -name .git -prune \) -exec git rm -r {} \;