226 | | === Backporting of a single commit === |
227 | | |
228 | | {{{ |
229 | | # temporarily switch to master |
230 | | git checkout master |
231 | | |
232 | | # update master to fetch the commit to be backported |
233 | | git fetch --all --prune |
234 | | |
235 | | # ??? With git log, identify the sha1sum of the commit you want to backport (example: backport into releasebranch_7_6) |
236 | | git log |
237 | | |
238 | | # Note: only needed if you have your fork as "origin" (see above) |
239 | | # update local repo |
240 | | ## NO git pull origin releasebranch_7_6 --rebase |
241 | | |
242 | | # switch to branch |
243 | | git checkout releasebranch_7_6 |
244 | | |
245 | | # merge updates into local releasebranch_7_6 |
246 | | git merge upstream/releasebranch_7_6 |
247 | | |
248 | | # at this point we have reached: |
249 | | # (HEAD -> master, upstream/releasebranch_7_6, releasebranch_7_6) |
250 | | |
251 | | # ??? update own remote |
252 | | git push origin releasebranch_7_6 |
253 | | |
254 | | # now backport the commit (edit conflicts if needed) |
255 | | git cherry-pick the_sha1_sum |
| 226 | === Backporting of a single commit from master to release branch === |
| 227 | |
| 228 | ... assumming that we are in releasebranch_7_8 branch: |
| 229 | |
| 230 | {{{ |
| 231 | git fetch --all --prune |
| 232 | git rebase upstream/releasebranch_7_8 |
| 233 | # get hash from GitHub or git log in master |
| 234 | git cherry-pick <hash> |
| 235 | |
| 236 | #(or |
| 237 | #git cherry-pick -m1 hash |
| 238 | #when cherry picking a merge request) |