Skip to content

Instantly share code, notes, and snippets.

View GuySartorelli's full-sized avatar

Guy Sartorelli GuySartorelli

View GitHub Profile
@GuySartorelli
GuySartorelli / instructions.md
Last active May 2, 2024 05:04
Setting up xdebug for a DDEV project in vscode

Setting up xdebug for a DDEV project in vscode

This is based on the instructions at https://ddev.readthedocs.io/en/stable/users/debugging-profiling/step-debugging/#visual-studio-code-vs-code-debugging-setup If there's something in this gist that doesn't work, check the docs in case things have changed.

  1. Create a .vscode/ directory in your project root.
  2. Create a launch.json file inside that .vscode/ directory with the contents from https://ddev.readthedocs.io/en/stable/users/snippets/launch.json
  3. Create a tasks.json file inside that .vscode/ directory with the contents from https://ddev.readthedocs.io/en/stable/users/snippets/tasks.json

The .vscode/launch.json file tells vscode how to listen to xdebug, and also tells it to enable/disable xdebug for you.

@GuySartorelli
GuySartorelli / reset-commits.md
Last active March 11, 2024 20:54
How to reset commits on a pull request after retargetting it to a new branch

Resetting commits after retargetting a pull request

Sometimes after retargetting a pull request to a new branch, you'll find a lot of new commits are added to the PR that weren't there before. This is because the branch you used to create the pull request has additional commits on it that aren't in your new target branch.

Solution one: Reset commits

# Show the last commit(s) in your PR branch