0

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.

A mental model of Git workflow and commands/actions 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.

Matthew
  • 156
  • 1
  • 9
  • 1
    What do you mean by "mod the game"? – Khalil Khalaf Jan 14 '20 at 16:42
  • Edit the game's files according to my preferences. In the past I've changed art and configuration files, but if I could get Git working reliably, then the next step is editing C++ files too. I call it "modding" rather than "developing" or "coding" to emphasize that (a) the main direction of changes is from the community to me, (b) my changes may never be accepted into the community version, and (c) I'm not a professional programmer. – Matthew Jan 14 '20 at 16:52
  • 1
    With Git just call it "change the files", because the context does not care about your position, which files you are editing or the workflow of your organization. It is Version Control (or maybe File-Changes Management - Any file under the repository). Trying to help you simplify your Q to get better answers. – Khalil Khalaf Jan 14 '20 at 17:41
  • Thank you, friend Khalil! I will think about your suggestion. – Matthew Jan 15 '20 at 05:34

0 Answers0