This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This will leave local unmanaged files untouched | |
# Clone just the repository's .git folder into an empty temporary directory | |
git clone --no-checkout my-project-repo my-project.tmp # might want --no-hardlinks for cloning local repo | |
# Move the .git folder to the directory with the files. | |
mv my-project.tmp/.git ./ | |
# Delete the temporary directory | |
rmdir my-project.tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download git version of drupal moodule to be patched, while keeping version in info file | |
drush pm-download module_name --package-handler=git_drupalorg --gitinfofile | |
# apply patch | |
git apply -v path/file.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Put site in maintenance mode | |
drush vset maintenance_mode 1 | |
#Clear cache | |
drush cron | |
drush cc all | |
#Backup db | |
drush sql-dump --result-file=../before-update-xx.sql --gzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Put site in maintenance mode | |
drush vset maintenance_mode 1 | |
#Enable updates | |
drush en update -y | |
#run cron | |
drush cron | |
#refresh update status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Show: | |
defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder | |
#Hide: | |
defaults write com.apple.finder AppleShowAllFiles -boolean false ; killall Finder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Find git root directories in home folder | |
find ~ -type d -name .git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# download latest drupal core | |
drush dl drupal | |
mv drupal-7.xx mysitedirectory | |
# download appropriate language files from http://ftp.drupal.org/files/translations/7.x/drupal and place them in mysitedirectory/profiles/standard/translations | |
# install in French | |
drush si --db-url=mysql://dbusername:dbpassword@localhost/dbname --db-su=name --db-su-pw=password --site-name="Your New Site" --locale=fr --account-name=siteadm1 --account-pass=siteadm1password --account-mail=admaddress@mail.com | |
# Add French and make default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone --no-checkout repo-to-clone existing-dir/existing-dir.tmp # might want --no-hardlinks for cloning local repo | |
mv existing-dir/existing-dir.tmp/.git existing-dir/ | |
rmdir existing-dir/existing-dir.tmp | |
cd existing-dir | |
git reset --hard HEAD # git thinks all files are deleted, this reverses that behaviour |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
</head> | |
<body> | |
</body> | |
</html> |