Hi all, hopefully you can help me out with this question.
I have created a deployment pipeline which uses the ssh-run pipe to go into a server and run a few deployment scripts located on the server. The purpose of the deployment scripts is to pull changes from the Bitbucket repository into the server repository.
cd /home/user/staging.site.co.uk/site-live/ git fetch origin git reset HEAD origin/staging git pull origin staging
cd /home/user/public_html/ git fetch origin git reset HEAD origin/master git pull origin master
I have not created these deployment scripts so I am a bit unsure of the commands. My first issue is the use of the 'git reset HEAD' in both of the deployment scripts. As I understand it this command resets the index but not the actual working tree. What would be the purpose of this command in the deployment script.
My second issue is the git fetch and the git pull command. Is the git fetch redundant in this script.
Thanks.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.