git reset --hard c517b565b2bcc0cf2ca5265b6ea6657f253fe2af
git push -f
to move git to previous commit and push it to remote server, we first need to reset hard to SHA value and then push it with force to overide current state
git reset --hard c517b565b2bcc0cf2ca5265b6ea6657f253fe2af
git push -f
to move git to previous commit and push it to remote server, we first need to reset hard to SHA value and then push it with force to overide current state
Find a commit hash where merge occured to master and then
git revert -m 1 <commit-hash>
git commit -m "Reverting the last commit which messed the repo."
git push -u origin master
Lets say you need to put something to LIVE site fast. And you go and check what is currently in line to get pulled once you fire git pull (https://itportal.foreo.com/documentation/card/1011) and see there are other branches/commits coming and you are dont know is it LIVE material. There is a side route for this cases.
Lets say you go to production site GIT and fire "git pull" command, something goes wrong, there are conflicts and you start to panic. Proper solution for this is to write
git reset --hard
This will clean the mess and put GIT to state before this.
Before final git pull to LIVE site, it is a good idea to check what is going to be pulled. So to do that
In case ajax calls are making a trouble and developer needs more information about what is happening regarding:
If you want to dump DB from production or develop servers and not include cache table values for faster importing you can use below script. You need to change site_name variable and DUMPDIR to match what you have and also user/password of DB
If you need to copy DB, lets say from production to develop you can use this script and call it like "develclone.sh original_db cloned_db"
For faster cloning it will exclude cache tables data.
I wanted to add a message to orders when I did some auto approving of orders. To add some trace of that you need to load user which will be the one that did that. Send $values that will be used for token replacement in message and also select which message type you are going to use. In here I made a clone of default message "commerce_order_admin_comment" and used that.
I finally converted this old blog from drupal 6 to drupal 8. Good starting point is this page
https://www.drupal.org/docs/8/upgrade/upgrading-from-drupal-6-or-7-to-d…