Archive for October, 2012

Git migrate repository

git remote add new_repo_name new_repo_url

git push new_repo_name master

git remote rm origin

Advertisements

Leave a comment

Git, create new repository from subfolder

git clone --no-hardlinks repo_original new_repo;
cd new_repo
git filter-branch --subdirectory-filter subdir/you/want
git remote rm origin
git update-ref -d refs/original/refs/heads/master
git reflog expire --expire=now --all
git repack -ad

Leave a comment