Git Basic Commands for Beginner


git

 

Check User Email:
=================
$ git config user.email

Add New Email address:
===================
$ git config user.email “your_email@example.com”

Check User Name:
=================
$ git config user.name

Add New User Name:
===================
git config –global user.name “Venugopal”

Push
===========
$ git add .
$ git commit  -m “Changed something”
$ git push

Pull
============
$git pull

Check Commits Logs:
=============
$ git log master
Press ‘q’ to stop

Adding File:
==================
$ git add.
$ git add index.html
$ git commit -m “Added New file”
$ git push

Remove File:
==================
$ git rm file1.txt
$ git commit -m “remove file1.txt”

Rename File:
==================
$ git mv #oldfile #newfile
$ git commit -m “rename oldfile to newfile”
$ git push