Jump to content
TrinityCore

How do I use Git for version control?


Bokrom
 Share

Recommended Posts

Hey everyone, I'm quite confused as to how I go about using Git to save changes I've made. I know I used Git Extensions and cloned the Trinity repository during setup, but I don't know how to save changes. I tried making a new repository in my build folder but I wasn't sure that was right.

I have a SS of Git Ext showing the repos on my computer. I know \Build\ is the one I created (which I'm not sure I should have), and I think \Trinity\ is the one I originally cloned, but I don't know what \Repo\ is.

Any help on this would be greatly appreciated. I'm scared of losing my work as the only back ups I have so far are on a flash drive.gitquestion.png

Link to comment
Share on other sites

Okay, but do you know which repo I should be using out of the 3 in the SS? I think that's what's confusing me the most. Also, when I'm committing, am I staging just TrinityCore.sln? What about the changes I've made to dbc files, authserver.conf and worldserver.conf?

Link to comment
Share on other sites

If you make changes in TC source files, then I guess the repository is  C:\Trinity if you are using that as the source (see cmake what is source folder)
If you make changes in DBC files then you should probably have them in a separate folder that has another git repository or you could move them to the TC source folder (the TC repository) when you want to add them to the version.
To back up the config files you should do the same as with DBC files. Either have them in a folder that is a git repository or move them to TC source folder.

One option is also to make the server folder a git repository, but Im not so sure that is a good idea.
The whole build folder being a git repository seems to me like a bad idea. Though it will capture all changes you have done in the sln file. I think though that you should be editing the cmake files and not the sln file as when cmake is run your sln changes may get lost I think (did not test).

Link to comment
Share on other sites

When I followed the core installation guide (https://trinitycore.atlassian.net/wiki/display/tc/Windows+Core+Installation) during setup, CMake had me use C:\Trinity\ for the source and D:\Build\ (E:\WoW Emulation\Build in my case) for the output. Is there changes I would make to the code that would require me to run CMake again? Because so far every change I've made (TrinityCore.sln, dbc's, .conf files) are reflected in my build folder.

Link to comment
Share on other sites

44 minutes ago, Bokrom said:

When I followed the core installation guide (https://trinitycore.atlassian.net/wiki/display/tc/Windows+Core+Installation) during setup, CMake had me use C:\Trinity\ for the source and D:\Build\ (E:\WoW Emulation\Build in my case) for the output. Is there changes I would make to the code that would require me to run CMake again? Because so far every change I've made (TrinityCore.sln, dbc's, .conf files) are reflected in my build folder.

If you change things in your source folder (D:/Trinity) then you need to run cmake which will alter the files in the build folder, like the sln file.
Also as you build the core many files will likely change inside the build folder, like logs and binary files and so on.

But you probably dont want to keep track of the changes cmake does to build folder or the changes compiling makes to build folder or bin folder as those are not "your changes"

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...