- Remove all files from working directory —
_ rm -rf ^.git(D)
- Open Drupal Releases page
- Copy link to the last release compressed to tar.gz
- Download and extract last Drupal —
tar xvf =(curl $(pbpaste)) --strip 1
- Restore deleted files in sites and profiles folder —
g ls-files -z --deleted -- {sites,profiles} | xargs -0 git checkout --
- Show status for these folders —
gst -- {sites,profiles}
- In most cases all changes to profiles folder are necessary —
ga profiles/
- It's ok to update default.settings.php —
ga sites/default/default.settings.php
- Add core functionality and readme files —
ga modules/ themes/ includes/ misc/ CHANGELOG.txt COPYRIGHT.txt INSTALL.txt LICENSE.txt update.php
- Check dotfiles and merge —
gdw .gitignore .htaccess robots.txt
. In the most cases just revert these —gco -- .gitignore .htaccess robots.txt
- Check the rest of deleted files —
g ls-files --deleted
. In the most cases just revert these —gco -- $(g ls-files --deleted)
- Check the rest. In the most cases just revert these —
gco -- .
- Commit —
gc
- Clean cache and revert features, alert after each stage —
{drush cc all |& alert}; {drush -y fra |& alert}
-
dos2unix sites/all/modules/custom/**/*.(php|module|inc|info|install|js|css|ini)(.)
-
dos2unix sites/all/modules/features/**/*.(php|module|inc|info|install|js|css|ini)(.)
-
dos2unix sites/all/themes/jsk_*/**/*.(php|module|inc|info|install|js|css|ini|txt|less|scss)(.)
-
p sites/all/themes/jsk_*/**/*.(php|module|inc|info|install|js|css|ini|txt|less|scss)(e_'[[ -n $(tail -c1 $REPLY) ]]'_) | xargs -pn1 -I{} sh -c 'echo >> {}'
-
p sites/all/modules/features/**/*.(php|module|inc|info|install|js|css|ini)(e_'[[ -n $(tail -c1 $REPLY) ]]'_) | xargs -pn1 -I{} sh -c 'echo >> {}'
-
p sites/all/modules/custom/**/*.(php|module|inc|info|install|js|css|ini)(e_'[[ -n $(tail -c1 $REPLY) ]]'_) | xargs -pn1 -I{} sh -c 'echo >> {}'