Important Git commands and Tutorials

How to get help for a Git commands

git help [-a|–all|-i|–info|-m|–man|-w|–web] [COMMAND]

Example: git help git

It launches a browser and shows a help in HTML.

Setting up local repository and making initial push:

cd my_project
git init
git add *
git commit -m "My initial commit message"
git remote add origin git@example.com:my_project.git
git push -u origin master

Checkout repository

git clone git://github.com/schacon/grit.git

To commit changes to the local repository just do add, than commit. If you want to push the local branch/changes to the remote repository just do push command below.

git add --all

git commit --all

git push

Push to repository command

git push <remote> <local branch name>:<remote branch to push into>
git push [--all | --mirror | --tags] [--follow-tags] [-n | --dry-run] [--receive-pack=]
           [--repo=] [-f | --force] [--prune] [-v | --verbose] [-u | --set-upstream]
           [--force-with-lease[=[:]]]
           [--no-verify] [ […]]

Further commands to find in following links.

Everyday Git with 20 commands

https://www.kernel.org/pub/software/scm/git/docs/everyday.html

Good Git Tutorials

Tutorial 1 first to make – http://git-scm.com/docs/gittutorial

Tutorial 2 second to make – http://git-scm.com/docs/gittutorial-2.html

Further Tutorial – http://www.vogella.com/tutorials/Git/article.html#firstgit_repostatus

2 responses to “Important Git commands and Tutorials”

  1. I wanted to thank you for this wonderful read!!
    I definitely loved every bit of it. I have got
    you book-marked to check out new stuff you post…

  2. Wow, this paragraph iѕ pleasant, my younger
    sisster iss analyzing these kinds oof things,
    thus I am going to inform her.

Efterlad et svar

Oplev mere fra Velislav Krastev Blog

Abonner nu for at fortsætte med at læse og få adgang til det fulde arkiv.

Fortsæt med at læse