Jump to content
  • 0

Updating Rathena Using Git Without Losing My Modifications


kevinkarl22

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  2
  • Reputation:   0
  • Joined:  03/27/16
  • Last Seen:  

Good Day! Can someone help me on how to update my rathena folder to the latest. I used git clone to get the rathena folder from here https://github.com/rathena/rathena but it keeps updating like every other day it has commits and what I am doing is using git clone again to get the latest rathena then modify my changes again. I keep doing that again and again. Is there an easy way to update my rathena folder without losing the modifications i made on that folder?

 

Thanks in advance!!  /thx  :)

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  350
  • Reputation:   43
  • Joined:  09/07/12
  • Last Seen:  

fork from rathena/rathena,
then you can clone from the copy you have in your repo.

Edited by benching
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  812
  • Reputation:   234
  • Joined:  01/30/13
  • Last Seen:  

Depends on what your changes are. If they don't conflict with the changes done to rAthena, then you can just do: stash save -> pull -> stash pop. Done.

 

Stash save basically saves your modifications into a separate file and removes them from the repository so you can update without any problems. Then pull gets the updates from rAthena. Then stash pop applies your modifications to the source again. Here it will also tell you when there are conflicts.

 

If there are conflicts you need to resolve them yourself by taking a look at the code.

 

So what I do in case of conflicts is... because I know my changes better than I know the changes from others, I keep a copy of my sources before the update and when there is a conflict I always just choose "Solve conflict using theirs" which removes my changes (but only those that are in conflict). Then I take a look at the modifications from me that got removed and think if I even still need them (could be that conflict is just there because rA fixed something I fixed beforehand, then I don't need my modification anymore). If I still need the modification I either just write it again into the new structure or open my old source file and the new version with a diff tool and move the lines I still need over from old to new.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  82
  • Reputation:   2
  • Joined:  04/27/16
  • Last Seen:  

Hi @Playtester

Can you share us guide for those commands please ? Currently using CentOS(CLI)

Thanks.

Edited by rmon
Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  812
  • Reputation:   234
  • Joined:  01/30/13
  • Last Seen:  

I'm using TortoiseGit so I can just click on the corresponding buttons. :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...