Wednesday, January 25, 2017

Git Basic Commands

Useful Git source control basic commands.




Cleanup:
git fetch
git remote show origin
git reset --hard origin/v0.2

Clone:
git clone http://git_url 
git clone http://username:password@git_url (clone with user credential)

To Get Commit Log:
git log --author="rajesh" > log.txt

Configure branch:
git config --get remote.(branch name).url

Branch Checkout:
git clone user@git-server:project_name.git -b branch_name 
(or)
git clone user@git-server:project_name.git -b branch_name --single-branch 


For more info:

Usage Guide:



Emoticon Emoticon