Posts Tagged “Terminal”

Git: Git Immersion Notes

Posted on April 2nd, 2015 by webninjataylor

Commands & Notes git add <FILENAME> to add a single file or git add . to add all files to staging git commit -m “MESSAGE” to commit in one step without entering editor mode Git history commands: git log git log –pretty=oneline git log –pretty=oneline –max-count=2 git log –pretty=oneline –since=’5 minutes ago’ git log –pretty=oneline […]

Command Line Crash Course Notes

Posted on April 2nd, 2015 by webninjataylor

pwd = Print Working Directory hostname = Display’s your computer’s network name mkdir DIRECTORY = Make directory cd = Change directory ls = List directory contents rmdir DIRECTORY = Remove directory pushd PATH = Saves current directory in memory, and takes you to the new path popd = Switches back to previous directory cp FILEPATH-FROM […]

Tags:
Posted in Web ShotsComments Off on Command Line Crash Course Notes

Git: Create New Repo Locally

Posted on March 28th, 2015 by webninjataylor

Create new repo on GitHub Create folders and files locally and use Terminal to push repo up… git init git remote add origin git@github.com:USER/REPO.git git add . git commit git push origin

Git: Checkout a Different Branch

Posted on March 27th, 2015 by webninjataylor

git checkout master /* switch to master branch */ git reset —hard /* clears local to match origin */ git branch -a /* lists branches */ git checkout BRANCH /* checks out BRANCH branch */

Terminal Shortcuts

Posted on June 23rd, 2014 by webninjataylor

ctrl + u erases entire line ctrl + c quits a binary execution and gets you back to the prompt

$PATH in Terminal

Posted on June 3rd, 2014 by webninjataylor

$PATH is a variable used by Terminal for scanning through a colon-delineated list of paths to binaries.  For example, when typing ls, sudo, npm, etc., Terminal searches through the paths for a match to the alias; when it finds a match it executes that binary. Resources The PATH Variable

PhoneGap in 60 Seconds

Posted on June 2nd, 2014 by webninjataylor

Install Node.js Open Terminal and install PhoneGap followed by Cordova… $ sudo npm install -g phonegap $ sudo npm install -g cordova Install SDK’s for targeted environments Create a New Project In Terminal, navigate to where you want to create the new project directory, and then run Cordova’s create command, passing in 1) The directory name […]

Git: Back to Commit X

Posted on May 1st, 2013 by webninjataylor

To get back to a specific commit type… git reset –hard fe8ef61119454071e87095e4ff8b24c6833cb0c6 …where “fe8ef61119454071e87095e4ff8b24c6833cb0c6” represents the commit’s SHA number.

Grunt

Posted on May 1st, 2013 by webninjataylor

Install the Grunt command line tool (requires node.js installed on your machine)… sudo npm install grunt-cli -g Create package.json in root of project (list of Grunt plugin dependencies) npm install (install the dependencies) Create Gruntfile.js in root of project (configuration) Basically, you need three different functions to work with Grunt: grunt.initConfig, grunt.loadNpmTasks, and grunt.registerTask Resources Grunt: A Build Tool […]

Terminal Aliases

Posted on March 18th, 2013 by webninjataylor

Creating a new alias (shortcut) in Terminal… Edit profile vim ~/.bash_profile Create alias alias mynewalias=’does this; and this’ Control+o (or esc) … :wq Save profile source ~/.bash_profile My list of aliases… alias aliasnew=’vim ~/.bash_profile’ alias aliassave=’source ~/.bash_profile’ alias an=’vim ~/.bashrc’ alias as=’source ~/.bashrc’ alias checkcss=’./scripts/verify_css.sh’ alias clear=’pip install -i http://23.20.194.155/simple -r setup/requirements.txt; source virtualenvwrapper.sh’ alias […]