<might be unnecessary>
First we create a new branch with
git branch newbranchon MIRPCADB and switch to it using
git checkout newbranchand push it using
git push -u origin newbranch</might be unnecessary>
Now we move over to our No.Noise repository and use the following command to fetch the contents of MIRPCADB in a new branch of No.Noise
git fetch git@github.com:tjom/MIRPCADB.git master:newbranchTo be able to use the commit history we use the following command to move the files from newbranch into a directory called old in our master branch
git filter-branch --index-filter \ 'git ls-files -s | \ sed "s-\t-&'"old"'/-" | \ GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info && \ mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE ' "newbranch"followed by
git merge newbranchNow we can simply move (copy and delete(!)) the files to our NoNoise plug-in src directory. After calling
git add -uall files should be recognized as 'renamed', which means that their history will be preserved.
After committing and pushing the changes to the desired branch, we call
git branch -d newbranchto remove the dummy branch.
[1] http://zrajm.org/ref/git-repo-merging.html
No comments:
Post a Comment