Scenario: You have customized a child theme and now want to know what files have changed and the specific code changes in those files compared with the original unmodified version of that theme.
In the screencast below I show how this can be done using the free Git client, SourceTree which is available for both Windows and Mac.
Not covered in the video: Click on the little gear to the right and tick ‘Ignore whitespace’.
Here are the steps:
- Place a copy of unmodified theme folder at a convenient location say, your desktop
- Drag this original theme folder into the main window of SourceTree. Untick “Also create remote repository” and click Create
- Double click to open the repo you just created
- Stage all the files and commit
- Click on master and branch it as say, dev
- Delete/overwrite all the unmodified files in the repo folder with modified ones
- Stage all the unstaged files and commit
- Right click on master branch and Diff Against Current
- Click on the little gear to the right and tick ‘Ignore whitespace’
- The list of files that are different will be at left and the specific code changes in the selected file at the right