Some useful command lines

I prefer UI instead of CLI, so every time I need to type in the terminal I forget some command. These are some:

rm -rf mydir

delete an empty or non empty folder (-f : force, -r : recursive)

touch myfilename

create an empty file

cp /dev/null myfilename

empty the document content

wget -m -p -E -k -K -np http://yourdomain.com/subfolder/

grab all the files of current folder and sub-folder

find . -name .DS_Store -type f -delete

delete all .DS_Store (hidden OSX files) starting from “.” (the current directory)

git reset --hard

reset and set the workspace to pull fresh again

git pull

pulls everything from the repo

git config --global credential.helper cache

after that, git will never ask for your user/pass again. But if you have some problem, you can specify your data into repo/.git/config with this:

[user]
    name = you_name
    password = you_password
[credential]
    helper = store
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

with that you can push with this info

git add <file>...

you stage the <file>

git add -A

you stage ALL files (also deleted files)

git commit -m "Add existing file"

you add a comment of the staged files

git push

you push (upload) all the files that staged