-
Notifications
You must be signed in to change notification settings - Fork 2
Transition_from_SVN_to_GIT
While switching your server to GIT may sound like a daunting task, it's relatively simple and straightforward, even for servers with heavy modifications. We strongly encourage you to do so, since our primary efforts will now be directed towards our repository on GitHub. Simply follow the steps listed below, depending on your OS:
For this process, we'll be using msysgit and TortoiseGit. Download and install both (in that order) if you don't have them already.
https://github.com/rathena/rathena
File:N9psegA.jpg File:iOeYCNr.jpg
That's it, you're finished. When you want to update your GIT repository, follow these steps:
File:JSjpp8l.jpg File:Fna1kfs.jpg
File:GwvsyxR.jpg File:sg3BF4Z.jpg
git clone
https://github.com/rathena/rathena.git
This creates the new directory named "rathena" and will be the new server location, but can be changed is desired.
svn co http://svn.code.sf.net/p/rathena/svn/trunk/
You can solve conflicts later, but it's best to do it now and make sure you can compile, and even test the server, before continuing.
cp -rf trunk/* rathena/
Recursive tag to copy all sub-directories and files, forced so you don't have to manually accept overwriting each file.
./configure && make clean sql
If there are any specific functions you enable when configuring, modify this command.
If you have any server auto-restart scripts, you can either edit the cronjob to point to a new location, or rename directories:
mv trunk trunk-bak && mv rathena trunk
git pull
These commands assume you have changed directory to new GIT directory. When doing a pull, you may receive a message saying:
Please, commit your changes or stash them before you can merge.
Aborting
In order to pull changes into your local repository, you have a couple options. The one which will be most used by our users is going to be to stash the changes and recall these changes after a pull. If you're just starting using GIT, then you'll need to configure a name and email before doing a stash.
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
Now, stash local changes:
git stash save "Update to Latest"
"Update to Latest" can be anything, it's just a note. Do the pull - Followed by a 'pop' to replace your code:
git pull
git stash pop
No conflicts? You're good to complete your update! Otherwise, keep reading...
It's possible that you'll run into conflicts along the way, with messages such as:
CONFLICT (content): Merge conflict in src/map/atcommand.c
When you see these messages, a conflict in merging your code occurred. Much like resolving code conflicts in SVN, these conflicts create points within the files which show your code compared to the code pulled from the remote repo. To fix them, open your files and find the conflict locations denoted by:
<<<<<<<: Indicates the start of the lines that had a merge conflict.
=======: Indicates the break point used for comparison. Breaks up changes that user has committed (above) to changes coming from merge (below) to visually see the differences.
>>>>>>>: Indicates the end of the lines that had a merge conflict.
Then you can choose which piece of code you wish to keep. After all shown conflicts are corrected, you can continue your normal update process.
- Setting your email in git
- How do I resolve git saying "Commit your changes or stash them before you can merge"?
- CONFLICT (content): Merge conflict in
Credits to Akinari for writing a good part of this guide. Credits to Euphy to putting it together on the forums
- Installation instructions
- Transitioning from SVN to GIT
- Compiling on your OS
- Connecting & Starting rAthena
- Scripting like a pro!
- Server Modifications and what to expect
- Database Configuration
- Adding Custom Items
- Adding Custom Monsters
- GRF Encryption
- Data folder
- Diff files