Created
February 14, 2013 12:23
-
-
Save hemantajax/4952444 to your computer and use it in GitHub Desktop.
how to use git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to use git | |
git init | |
git status | |
git add . | |
git commit -m "my 1st commit" | |
git log | |
sign in or create your GitHub account. | |
git remote add origin git@github.com:hemantajax/try_git.git | |
git push -u origin master | |
Pulling Remotely: git pull origin master | |
git diff HEAD | |
git diff --staged | |
Resetting the Stage: git reset octofamily/octodog.txt | |
Undo: git checkout -- octocat.txt | |
Create new branch: git branch clean_up | |
Switching Branches: git checkout clean_up | |
Removing All The Things: git rm "*.txt" | |
Commiting Branch Changes: Commiting Branch Changes | |
Switching Back to master: git checkout master | |
Preapring to merge: git merge clean_up | |
Removing branch: clean branch -d clean_up | |
The final push: git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment