Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tutorials:git-move-pkg [2011/05/23 13:11] pangercitutorials:git-move-pkg [2011/05/23 13:26] (current) pangerci
Line 1: Line 1:
 +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: 
 +    <code> 
 +    git filter-branch -f --tree-filter 'find . -maxdepth 1 -not -name . -a -not -name cool_package_name -a -not -name .git -exec rm -r {} \;' 
 +    </code>  
 +    //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
 
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki