Local & Remote Repos: View Existing Remote Repositories
Local & Remote Repos: View Existing Remote Repositories
Git Status
$ git status
Staging
Add a specific file to commit
$ git add filename
S
Commit Logs
$git log
Add Origin
$ git remote add origin repo-url
-u origin master is required only while pushing first time. Next time onwards `$ git push` is sufficient.
Branching
Create a branch
$ git branch MyBranch
Switch to branch
$ git checkout MyBranch
When you switch to the particular branch the local folder contents change to resemble to the contents
of the switched branch.
To Merge branch
Stashing
http://git-scm.com/book/en/v1/Git-Tools-Stashing
$ git stash
$ git stash list
$ git stash apply
$ git stash apply --index
$ git stash drop --index
$ git stash pop
Mergetool
$ git merge tool