User Tools

Site Tools


kb:scc:git:git-split-repos

22 Split Repositories

Step-by-step

This is how to single out one of three folders (/Generic Networking/) from the hampelsoft-dqmh repo into the new generic-networking repo:

  git clone git@gitlab.com:hampel-soft/hampelsoft-dqmh.git generic-networking
  cd generic-networking
  git remote rm origin
  git filter-branch --index-filter 'git rm --cached --ignore-unmatch -r Demo\ Application' -- --all
  rm -rf .git/refs/original/
  git filter-branch --index-filter 'git rm --cached --ignore-unmatch -r DQMH\ Module\ Templates' -- --all
  rm -rf .git/refs/original/
  git remote add origin git@gitlab.com:hampel-soft/dqmh/generic-networking.git
  git push origin master
kb/scc/git/git-split-repos.txt · Last modified: 2023/07/08 12:18 by joerg.hampel