Saturday, November 23, 2013

How to merge github wiki changes from one repository to another

User forked a repository on GitHub and wiki pages are also forked, user do changes to wiki, but there is no way to send pull request for wiki changes, but Wiki is just another sub repository in GitHub repo, so admin of original repository have to do merge manually.

source wiki:
target/original wiki:

Source of wisdom for massive squash.

git clone
git fetch master:master-Vadim
git checkout master-Vadim

#checkout to last non-Vadim's commit  
git reset --hard 34a2f8e627dd6209f4928b6f66a37368789ab492

# do massive squash of all Vadim's changes
git merge --squash HEAD@{1}          
git commit -m "How to use SevNTU Checkstyle in Intellij IDEA (markdown)"
git checkout master

# cherry-pick newly squashed  commit
git cherry-pick cbe1915a65d80769d56f4fbd9a60dd0b88c8c049    

git push

If wiki was forked from latest state of original wiki, you can do it a bit simpler:
git clone
git pull master
# squashing all Vadim's changes in one 
git push origin master

No comments:

Post a Comment