Categories
Git

Unable to connect to github.com

Example Code to run

Git config global URL from git://github.com to https://github.com

git config --global url.https://github.com/.insteadOf git://github.com/

This replaces git: to https:

Solution to Issues such as

bower install stops with error : fatal: unable to connect to github.com

Categories
Web Server

cURL error 28: Operation timed out error fix [WordPress]

Categories
Git

Git : Revert back to Previous Revision

Revert back to Previous version in git

Required

  • Get the REVISIONNUMBER ( Revision number ) of the previous Revision which you want the files to revert back to.

Here is how you could revert back to previous Revision in git

  1. git reset –hard REVISIONNUMBER
  2. git push –force

Caution

This will delete all yours commits made between the REVISIONNUMBER and the CURRENT Revisionnumber

Categories
Command Line

SSH : Change Owner of files and folders

Change Owner of All files within a Folder

Here is how to change Owner of Files and Folders in SSH as a Bulk

  • Login to SSH
  • Run chown -R user:usergroup /location/of/the/folder/*
$ chown -R user:usergroup /location/of/the/folder/*

Change Owner of one file

$ chown user:usergroup /location/of/the/folder/file-name.php

Find the list of files under an Owner

$ find /location/of/the/folder/ -user USERNAME
Categories
Coding Uncategorized

Don’t use template_redirect always

Follow this linkĀ 

Don’t use template_redirect to load an alternative template file