git basic commands

(1) Set the Identity

$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com

(2) Set Editor

git config --global core.editor nano

(3) Check Your settings

git config --list

(4) Initializing a Repository in an Existing Directory

git init

(5) Add Files into Existing repository

git add testfile.txt
git commit -m "Initial Commit"
(6) Clone existing repository
<pre lang="GNU">
git clone git://github.com/schacon/grit.git

Leave a Reply

*