Skip to content

Instantly share code, notes, and snippets.

@robertocinetto
Created June 21, 2023 15:40
Show Gist options
  • Save robertocinetto/31da7eaa909b65aebb5203c4e2041cb6 to your computer and use it in GitHub Desktop.
Save robertocinetto/31da7eaa909b65aebb5203c4e2041cb6 to your computer and use it in GitHub Desktop.
Command Line Cheatsheet

OB staging-001 ssh -p 0705 [email protected] OR Use client slug as user to get to that folder

Monitor log file for wp-env from WP container CLI in Docker tail -f wp-content/debug.log —OR— From project root: npm run wp-env run cli bash then: tail -f wp-content/debug.log Or exclude deprecated notices: tail -f /wp-content/debug.log | grep -v "Deprecated"

Symlink

ln -s /path/to/original /path/to/link

Get and copy directory path pwd|pbcopy

Reset local commits to origin, and reset working directory git reset --hard origin/develop

Reset local commits to origin, but keep changes in working directory git reset --mixed origin/develop

Reset last local commit to working dir git reset HEAD~1

Switch between last two branches git checkout -

Quick n Dirty hot reloaddddd care of Matthew Requires global browser-sync install browser-sync start --proxy 'http://localhost:8888' --serveStatic 'src' --files 'src' browser-sync start --proxy 'http://localhost:50000' --serveStatic 'src' --files 'src'

React

Which version of React am I using? npm view react version

Too much console log spam?

tail -f /wp-content/debug.log | grep -v "Deprecated"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment