Copied from Github: https://help.github.com/articles/set-up-git
Tell git your name:
$git config --global user.name "Your Name Here"
# Sets the default name for git to use when you commit
Tell git your email address:
$git config --global user.email "[email protected]"
# Sets the default email for git to use when you commit
Github has a great resource here: https://help.github.com/articles/generating-ssh-keys
Go to your existing folder:
cd /to/my/folder
Initialize local git repo in that folder:
git init
Add existing files to local repo and commit:
git add .
git commit -m "Initial submission."
Add remote:
git checkout master
git remote add origin [email protected]:project.git
To clone an existing repository, run the following command.
git clone git://github.com/schacon/simplegit.git
This will create a folder name 'simplegit' within the current working directory. If you would like an alternate name for the folder, try:
git clone git://github.com/schacon/simplegit.git newfolder
git rm --cached notes.txt