Skip to content

Instantly share code, notes, and snippets.

@caseypugh
Created June 18, 2012 15:51
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save caseypugh/2949041 to your computer and use it in GitHub Desktop.
Save caseypugh/2949041 to your computer and use it in GitHub Desktop.
GIT MADE EASY

Install jamiew’s git-friendly: github.com/jamiew/git-friendly

Some common shorthands I use - type these into your terminal

git config --global alias.st "status -s"
git config --global alias.ca "commit -a -m"

Checkout new repo

git clone git@github.com:vhx/watchlater

go into your vhx folder

cd ~/dev/vhx

Checks current status of modified files

git st

Shows you all the current modifications

git diff

Add a single file

git add path/to/my/file.css

Add a folder (this will add all files inside of it)

git add path/to/my/folderofshit

Selective adding of files using wildecard (*)

git add path/to/my/folder/st*.css

commit all your changes

git ca "These are my changes"

Revert a modified file

git checkout path/to/file.css

push all your changes to the server

push //the magic way
git push origin master //the standard way

sync with the server

pull //the magic way
git pull origin master //the standard way

Change branches (master is the root/main branch)

branch mybranchname

See list of branches

branch
@yewknee
Copy link

yewknee commented Aug 28, 2012

git commit -a -m "my message"

@yewknee
Copy link

yewknee commented Sep 4, 2012

rake db:setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment