how to set up git code example

Example 1: git config global

$ git config --global user.name "John Doe"
$ git config --global user.email [email protected]

Example 2: login github command line

git config --global user.email "[email protected]"

Example 3: how to set up git user

$ git config --global user.name "Mona Lisa"

Example 4: git hub set up

mnelson:myproject mnelson$ git remote add origin https://github.com/cubeton/mynewrepository.git
mnelson:myproject mnelson$ git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 263 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/cubeton/mynewrepository.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.