I'm new to GIT and Applying Security Patches. What is the most efficient way to apply a Magento Security Patch using GIT? Do I just push it to Magento's root directory and then use SSH to install it? I'm a bit confused because because looking at commit history it looks like other developers pushed difference files? Lastly, I have a total of 4 security patches to install. Should I commit them individually? or as a group? Thank you for any clarification.
Ideally you would create a new branch for your patch, then apply the patch and merge the branch for production when you are ready to deploy.
It would be best to put the patch number in your commit so other can see it (Find it later if needed)
As for deployment the rudimentary way would be to logon to your server via ssh and do a git pull origin master... of course this is not the best practice. But it will work.
I would put each patch separately in a new feature branch and then merge them to master.
You should clone the repo locally, apply the patches, and push the changes.
git clone https://repo.example.com/company/magento ~/magento cd ~/magento mv ~/Downloads/PATCH_SUPEE* ./ bash PATCH_SUPEE-1.sh git add . git commit -m 'Applied patch SUPEE-1' # Repeat line 4-6 for patch 2, 3, etc git push origin master
Then deploy/pull the updated branch to your server.