Home > git2git

git2git

Git2git is a project mainly written in Shell, it's free.

A migrating tools from git repository to git repository with specific directory

MOTIVATION TO CREATE THIS TOOL

I need a new repository which contains specific directories with history in existing repository. I make this tool.

HOW TO USE git2git

$ cd git/existingrepository.git $ git2git.sh ${directory to migrate} ${branchname to save new commit object} $ git branch ${branchname to save new commit object}

  • master $ cd .. $ mkdir newrepo $ cd newrepo $ git init $ git fetch ../existingrepository.git ${branchname to save new commit object} master $ git co -b master FETCH_HEAD