Per Søderlind

I code for fun

Page 2 of 33

101: How to fetch a git pull request

 

git-pull-request-twitter

You should test pull requests locally before you merge them with your code. Fetching a pull request from a remote repository is simple, just do:

  1. In your local project folder, do: git ls-remote
    You’ll get a list like this:
    From https://github.com/soderlind/myproject.git
    15438eca8b7f62f371985823fe6fa8c60d7a3b50 HEAD
    15438eca8b7f62f371985823fe6fa8c60d7a3b50 refs/heads/master
    4abd4e393cc1bc57af576a67a1a56b3dae6ecabd refs/pull/2/head
    e05af83eeebb01e52d8b42f24c570c8290e0b351 refs/pull/4/head
  2. Find the pull request in the list above, and fetch it, eg:
    git fetch origin refs/pull/4/head
  3. Temporarly checkout the pull request: git checkout FETCH_HEAD
  4. Test the code
  5. Return to the master: git checkout master
  6. If everything is fine, you can now merge the pull request in the remote repository and pull it down to your local project: git pull

My WordPress plugins are ready for 4.6

Tested & found compatible with WordPress 4.6. My plugins are following the WordPress Coding Standards.

Plugin Travis CI Code Climate
CSS Flags library
Date and Time Picker field
Debug Bar List Script & Style Dependencies
delicious tagroll shortcode
Google Tag Manager Multisite Admin
lorem shortcode
Metro Share Social Fonts
My Permalink Demo
Read Offline
Remove the “Comments are closed”
WP Anchor Header
WP-DenyHost
WP Link To Playlist Item

 

On your Mac, use Larvel Valet for local WordPress and PHP development

Read More

Spring Cleaning 2016

WordPress 4.5 is out and my plugins needs some dusting. I will upgrade most of my plugins. I will update this page as it happens.

Read More

DropzoneJS & WordPress REST API with Custom Endpoint

dropzonejs-wordpress

The plugin provides drag’n’drop file uploads and uses the wp rest api to upload the file.
This version adds a custom endpoint, has code for handling the upload and uploads the file to uploads/yyyy/mm without adding the file to the media library.  If you need to upload the file to the media library, see  DropzoneJS & WordPress REST API.

Read More

Page 2 of 33

Powered by WordPress & Theme by Anders Norén