Header Ads

GIT Cheat Sheet

GIT Cheat Sheet
Basic Github Cheat Sheet
Create and Clone
Create New Repository - git init
Clone Local Repository - git clone/path/to/repository
Clone Remote Repository - git clone username@host:/path/to/repository
Commit and Synchronize
Commit Changes - git commit -m "Commit Message"
Push Changes to Remote Repository - git push orgin master
Connect Local Repository To Remote Repository - git remote add orgin cserver
Update Local Repository With Remote Changes - git pull
Branches Related
Create New Branch - git checkout -b <branch>
Switch To Master Branch - git checkout master
Delete Branch - git branch -d <branch>
Push Branch To Remote Repository - git push orgin <branch>
Merge
Change In Merge For Other Branch - git merge <branch>
View Change Between Two Branch - git diff<source_branch><target_branch>
Clone Remote Repository - git clone username@host:/path/to/repository
Tagging
Create Tag - git tag<tag><commit ID>
Get Commit IDs - git log

No comments:

Powered by Blogger.