Skip to content

Instantly share code, notes, and snippets.

View Furao's full-sized avatar

Robbie VanVossen Furao

  • DornerWorks
  • Grand Rapids, MI
View GitHub Profile
@Furao
Furao / MoveGitSubDirToRepo.sh
Last active September 27, 2015 17:18
Useful git commands I always need to look up.
# Move a subdirectory from 1 repository to another
# Source Repo
git clone <git repository A url>
cd <git repository A directory>
git remote rm origin
git filter-branch --subdirectory-filter <directory 1> -- --all
mkdir <directory 1>
git mv <directory 1 contents> <directory 1>
git commit