Skip to content

Converting a new 3rd party guide from a pull request to a separate repo

Greg L. Turnquist edited this page Jan 28, 2022 · 2 revisions

Members of the community may submit new guides. The recommendation is that they work a branch on fork of this repository, and submit a pull request. From there, it's very easy to create a new repository, pull in their commits, and make final edits for publication.

  • When a pull request is submitted to this repository, DO NOT MERGE IT. The only pull requests merged to this repo are tweaks to the templated version of a guide.

  • Instead, on your local machine, create a new git project.

mkdir draft-gs-<new-guide>
cd draft-gs-<new-guide>
git init
  • GitHub has a hyperlink inside the pull request that shows you how to manually merge a pull request. You just need to extract one line to get the author's existing commits. For brevity, that step is listed below:
git pull [email protected]:<author's github id>/<author's repo name>.git <branch_with_pr>

For example, gs-producing-web-service was pulled in with:

git pull [email protected]:maciejwalkowiak/draft-gs-producing-web-service.git main

In this example, user maciejwalkowiak submitted from his draft-gs-producing-web-service repo on his main branch. If you're unsure, look the pull request's expandable instructions for manually merging to find a similar command.

NOTE: Don't worry about putting the commits on a separate branch for your local repo. Instead, just pull them into your main branch.

  • When you're done, create a new repo at https://github.com/spring-guides based on existing procedures. Then push the author's guide along with any extra commits you added up to github.

  • Finally, close the initial pull request by including a link to the new repo and any related github issues. This will provide a nice trail for the original author to follow. Include a comment for the original author to continue all work by forking the new repo.