Jump to content
  • 0

Add a filter to ignore Git files on mod upload



I like to keep all my projects saved on cloud. in this instance, i use Github.

I noticed that when i initialize the directory for git control, all those git meta file are added to the list of files for the mod to be uploaded.
This suggestion is not required but would make things easier, because right now i have to keep the development in a separated folder because of Git. When i need to test the mod, i have to copy everything to the avorion's appdata mod folder.


Link to comment
Share on other sites

1 answer to this suggestion

Recommended Posts

  • 0

On windows 10/11 you can do the following:

given the following directories

WorkDir = %AppData%\Avorion\mods\YourMod

GitDir = ..\Documents\GitHub\Avorion\YourModRepo

  1. open cmd (as administrator on Windows 10)
  2. navigate to GitDir
  3. type mklink /J FolderNameInRepo WorkDir

Note: I recommend to use the same folder name in your repo as your mod, so FolderNameInRepo = YourMod

now move all your non-mod files into YourModRepo and you are done.

after mklink your repository should look like this:

  • .\
    • Documents\
      • GitHub\
        • Avorion\
          • YourModRepo\
            • .git\
            • FolderNameInRepo\
            • ReadMe.md
            • .gitignore
            • .gitattributes
            • other files and/or folders
            • ...

and WorkDir would remain untouched. Now git should find the files pointed to by the junction FolderNameInRepo, i.e. the files in WorkDir.

If you ever clone your repo, it won't create a junction and you will have to move FolderNameInRepo to %AppData%\Avorion\mods and then create the junction again. If you named FolderNameInRepo differently, you'll have to rename it to YourMod again.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...