The setup wizard interactively configures your flow and neos forks and will also create the forks for you if needed. It further renames the original remotes to "upstream" and adds your fork as remote with name "origin".
./flow github:setup
The command
./flow github:createPullRequestFromGerrit <gerritPatchId>
transfers a gerrit patch to a github pull request. In detail it does the following steps:
- Pull the change as patch from gerrit
- Create a new branch for that patch from upstream/master
- Patch the code and create a new commit
- Push the commit to your fork on github
- Create a pull request
- Switch local repository back to master
These are the steps you have to do to manually move a Gerrit patch to Github. The example commands move a patch for the package TYPO3.TYPO3CR. If you have changes that are stacked on each other, repeat step 6 until all needed changes have been applied, then continue.
-
Go to your change on https://review.typo3.org
-
If you haven't done yet, fork the Neos Development Collection repository and clone the fork on your machine
-
Bring your local fork repository and code up to date with the upstream repository
-
Add a new branch, for example "change-xx-yyyyy-z" or "neos-12345"
-
Navigate to the package directory (e.g. Packages/Neos/TYPO3.TYPO3CR/)
-
Patch your code using
git am
after having copied the "fomat patch" git command. Example:git fetch http://review.typo3.org/Packages/TYPO3.TYPO3CR refs/changes/xx/yyyyy/z && git format-patch -1 -k --stdout FETCH_HEAD | git am -k --directory TYPO3.TYPO3CR
Mind the added
-k
for theformat-patch
andam
git commands, it makes sure tags like[TASK]
are kept.If you are patching a repository that is not a "development collection", you can leave out
--directory
. -
Check the result (you may need to amend the commit to fix the [] used in the subject line if you left out the
-k
option) -
Push the changes to origin/branchName
-
Go to Github and open a pull request
-
Abandon the change on Gerrit.
Hint: If you are using SourceTree, steps 8 and 9 can be done by using the "Create Pull Request" item in the "Repository" menu.