Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

Using Git for Modding

From TWC Wiki
Revision as of 15:26, 11 October 2023 by Dismounted Feudal Knight (talk | contribs) (following through on a train of thought)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Instructions originally written by Medik on Discord, who deserves full credit for inspiring this page.

Git is a version control tool used in both professional and hobby environments. It tracks changes made, has powerful version comparison and control, and offers an industry-relevant, professional way to create mods for a fairly low learning investment.

If combined with a site such as Github, this process can allow teams to collaborate without stepping on each other's toes, to more clearly observe what is happening and who does what, and even allow unrelated people to offer suggestions and report bugs in the same interface.

Using Git

Offline use

  1. Install Git (official download for windows)
  2. Open a terminal and navigate to your mod folder (e.g: cd C:\Users\eddie\games\medieval II total war\mods\my_important_mod)
  3. Create a new .gitignore file (example: DAC gitignore on github) to tell Git to ignore certain files (such as images, models and textures as desired)
  4. Run git init to tell Git to watch the directory
  5. Run git add . to add all your existing files that work
  6. Run git commit -m "Adding working files"

You should now have a working local git repository! Consult one of the following guides for instructions how to make the most of git from the command line:

  • guides for basic git use here

You can also manage Git graphically if you prefer.

  • graphical git tools here

Using with GitHub

Further instruction required

Additional considerations

There should not be issues with publishing (for example) a Medieval 2 mod folder to GitHub, but attribution/permission from original creators should be observed if this is being done with existing projects. Obviously, publishing copyrighted works and core game files should not be done.

YOU can help us improve this Wiki! ~ Look for ways to help and editing advice. ~ If you need further advice, please post here.