@@ -55,9 +55,14 @@ git clone -b gh-pages https://github.com/OpenOrienteering/mapper-manual.git
5555cd mapper-manual
5656git remote add mapper https://github.com/OpenOrienteering/mapper.git
5757git fetch mapper master
58- git branch master mapper/master
5958~~~
6059
60+ The ` git subtree ` command no longer creates the same history as when we started.
61+ But it is possible to run the original ` git-subtree.sh ` script, available at:
62+ https://github.com/git/git/raw/refs/tags/v2.17.1/contrib/subtree/git-subtree.sh
63+ The following steps assume that this script in a place where it is found via the PATH environment variable.
64+
65+
6166### Merging the images from Mapper to the manual
6267
6368The images used by Mapper are maintained in the images directory of the mapper repository.
@@ -68,22 +73,31 @@ The git history is maintained in the mapper master branch, so we can squash all
68731 . Split the images out of the mapper master branch into the mapper images branch:
6974
7075 ~~~
71- git fetch mapper images
72- git checkout master
73- git pull mapper master
74- git subtree split -P images -b images --squash
75- git push mapper images:images
76+ git fetch mapper master
77+ git checkout mapper/master
78+ git-subtree.sh split -P images
79+ ~~~
80+
81+ The last command will print a git commit ID ` <sha> ` which can be used
82+ to create local or remote branches, or to access the commits directly.
83+
84+ 2 . Merge the images into the mapper-images subtree of the mapper-manual gh-pages branch:
85+
86+ ~~~
87+ git fetch origin gh-pages
88+ git checkout origin/gh-pages
89+ git-subtree.sh merge -P mapper-images --squash <sha>
7690 ~~~
7791
78- 2 . Pull the images into the mapper-images subtree of the mapper-manual gh-pages branch:
92+ 3 . You can push the changes to your fork of the mapper-manual repository
7993
8094 ~~~
81- git checkout gh-pages
82- git pull origin gh-pages
83- git subtree pull -P mapper-images --squash mapper images
84- git push
95+ git push <your-remote> HEAD:refs/heads/update-pages
8596 ~~~
8697
98+ When everything is ready, open a pull request in the manual repository of Mapper.
99+ Use title "Merge updated mapper-images".
100+
87101### Merging the pages from the manual repository to Mapper
88102
89103The contents of the manual are maintained in the pages directory of this repository.
@@ -95,28 +109,34 @@ The following assumes that you are working in the mapper-manual repository
95109(i.e. git remote "origin" points to the mapper-manual repository on Github),
96110and you add another git remote "mapper" which points to the mapper repository on Github.
97111
98- 1 . Push the pages out of this repository's gh-pages branch into the mapper manual branch:
112+ 1 . Split the pages out of this repository's gh-pages branch into the mapper manual branch:
99113
100114 ~~~
101- git fetch mapper manual
102- git checkout gh-pages
103- git pull
104- git subtree push -P pages --squash mapper manual
115+ git fetch origin gh-pages
116+ git checkout origin/gh-pages
117+ git-subtree.sh split -P pages
105118 ~~~
106119
107- 2 . Pull the pages into the doc/manual/pages subtree of the mapper master branch:
120+ The last command will print a git commit ID ` <sha> ` which can be used
121+ to create local or remote branches, or to access the commits directly.
122+
123+ 2 . Merge the pages into the doc/manual/pages subtree of the mapper master branch.
108124
109125 ~~~
110- git checkout master
111- git pull
112- git subtree pull -P doc/manual/pages --squash origin manual
126+ git fetch mapper master
127+ git checkout mapper/master
128+ git- subtree.sh merge -P doc/manual/pages --squash <sha>
113129 ~~~
114130
115- Use "doc/manual: Merge updated pages subtree" as commit message.
116-
117- 3 . Check that Mapper builds without errors for ``` doc/manual ``` . Check the resulting manual. Really do that. Only when everything goes well, push the changes:
118-
131+ 3 . You can push the changes to your fork of the mapper repository
132+
119133 ~~~
120- git push
134+ git push <your-remote> HEAD:refs/heads/update-pages
121135 ~~~
122136
137+ 4 . Integrate the changes in a local build, and check that Mapper builds without errors
138+ for ``` doc/manual ``` . Check the resulting manual. Really do that.
139+
140+ 5 . When everything is ready, open a pull request in the main repository of Mapper.
141+ Use title "doc/manual: Merge updated manual pages".
142+
0 commit comments