Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Git and core hack

Viktor Iwan December 19, 2013
Hi guys, i would like to know if there is best practicec to maintain a 'core hack'.. At the moment, i am using joomla and wordpress as my main tools.. I usually do core hack to customize some things. As you know, core hack will be wiped out if the apps get updated. So, at the moment, i am using evernote to make note which lines of code that i need to change. So i wonder if git/stash can help me simplify things..

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
cofarrell
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 25, 2013

Hi Viktor,

Depending on how you build/deploy Joomla you could do the following. Take a snapshot of the vanilla distribution of the application. By that I mean create a git repository (git init), add all the files and commit (on the master branch). I don't know enough about Joomla but it would be even better if you could just use the actual repository, although it looks like they're broken down into small modules.

You should then checkout a new hack_branch and apply your hacks on top and make another commit. When the new version is released you checkout the original master branch, add and commit the files from that release (actually you should delete everything first and _only_ use the files from the release). You can then merge or rebase your hack branch and you are now up to date! The good thing about this approach is that you will see any merge conflicts immediately if you've hacked things that are now different. Git/DVCS is perfect for this approach. :)

Some pictures:

o master
 \
  o hack

Checkout master and add files from new version.

o---o master (with new version)
 \
  o hack

Merge...

o---o master
 \   \
  o---o hack + new version

I hope that helps?

Charles

TAGS
AUG Leaders

Atlassian Community Events