Larian Banner
Previous Thread
Next Thread
Print Thread
Joined: Nov 2018
stranger
OP Offline
stranger
Joined: Nov 2018
Hi there

For those of you wondering how to use git for your mods to not only get a version history but also be safe in case of any data loss or unwanted changes, here is a .gitignore file which worked for me (definitive edition).

How to use (working directory is your Data path):
  • Copy the dos2de.gitignore into your divinity data path usually found in "<Divinity Original Sin 2 Root>/DefEd/Data" and rename it to .gitignore
  • If you have problems renaming the file to .gitignore, then use cmd or powershell to do so.
    • cmd command is rename dos2de.gitignore .gitignore
    • powershell command is mv dos2de.gitignore .gitignore
  • Now let's start with the git stuff, initialise your repository with git init
  • Set the remote origin to your git hosting platform by executing git remote add origin <url>
  • Add all your mods to the version control by executing git add . (the dot is necessary)
  • Commit your changes with an appropriate message via git commit -vm "initial commit"
  • Push your changes into your remote repository with git push -u origin master


For any further changes you like to track use simply the following commands (working directory again the Data path):
  • git add . (again dot is necessary)
  • git commit -vm "message which describes your changes"
  • git push

Last edited by The Wolf Prince; 01/12/18 09:50 AM.
Joined: May 2017
enthusiast
Offline
enthusiast
Joined: May 2017
A fellow git user! I actually made a program that allows you to separate your mod projects away from the Data folder, via junctions, so you can track them individually. Works for both DOS2 Classic and the Definitive Edition. I use this for all my mod projects.

Links:
https://github.com/LaughingLeader/SourceControlGenerator
Source Control Generator Thread

Joined: Nov 2018
stranger
OP Offline
stranger
Joined: Nov 2018
Ah, perfect. This is way more sophisticated. You got a new star on your repo grin


Moderated by  Larian_Koala, Larian_KVN 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5