Posts Tagged “Git”

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 […]

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 */

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.

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 […]