The following sequence of steps teaches you how to move ROS packages from one (e.g. private) into another (e.g. public) repository while preserving the history at the same time.

  • git clone new-repos-uri
  • cd into new repos directory
  • git remote add src old-repos-uri
  • git fetch src
  • git checkout src/master -b tmp-branch
  • Do the magic filter command:
    git filter-branch -f --tree-filter 'find . -maxdepth 1 -not -name . -a -not -name cool_package_name -a -not -name .git -exec rm -r {} \;'
    
  //The above command basically removes in every revision everything but the directories .git and cool_package_name.//
* git checkout master
* git merge tmp-branch
* git filter-branch --prune-empty -f
* git push
 
tutorials/git-move-pkg.txt · Last modified: by pangerci · [Old revisions]
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki