Jump to content

Suggestion

Posted

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.

image.thumb.png.b1f3a6fd440c10ff278b12800d67e31e.png

2 answers to this suggestion

Recommended Posts

  • 0
Posted

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.

  • 0
Posted

You can use  `--separate-git-dir=../mymod.git`, then the only thing that gets uploaded with the mod is the dinky little pointer file.  To convert an existing repo, move its `.git` out of the work tree into a sibling and `echo gitdir: ../sibling >.git`.

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...