I play the open-source, community-maintained transport game Simutrans-Extended. I also mod the game. The community uses Git to develop the game, so I would like to understand the minimum about Git needed to mod the game and make my modifications available to other players on Github.com. This last aim is important, because the vast majority of the existing beginners' guides do not distinguish clearly how the repository on my home computer relates to the repositories in the cloud. I want them to be in sync more or less all the time. My first attempt following this answer resulted in an unusable repository, but I don't know whether my error was in the workflow or the commands I entered.
The diagram below shows my intended workflow. It assumes that the fork and home computer repositories have already been created. So the solid arrow lines always indicate changes to files. Note that I need to be able to build both the the community and modded versions indefinitely, so the master and mod-branch branches are intended to continue in parallel.
The diagram also shows the Git commands and Github.com actions that will hopefully implement the workflow. It makes use of this process. I am concerned that I am not using
git pull
anywhere. I don't know whether that means I have misunderstood something, or whether it's just irrelevant to this workflow.
The diagram deliberately omits any reference to staging, as this seems to be an advanced feature that I can learn about later if it is needed.
I am aware that there is something of a doctrinal dispute over whether it is best to use merge
or rebase
. I do not have a dog in that fight, but the most helpful article I found still does not help me choose because it does not clarify how it relates to the cloud repositories. So answers based on rebasing rather than merging are equally welcome.
The source file for the diagram is here and is public domain, so please feel free to edit it with corrections.