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
rake db:setup