$ git clone remote_url # clone a remote repo. Passing as argument a local directory this command clones a local repo.

$ git clone --depth 1 git://git.sip.router.org/sip-router kamailio # clones sip-router source code, creating a local directory named kamailio. "depth 1" option means it only takes one revision history. That reduces the amount of history to download, but it disallows cloning, fetching, pushing or pulling from this repo. Then, it is only suitable to generate patches.

$ git clone source_repo dest_repo # clones a local repository source_repo in another local repository dest_repo,
if both are directories.$ git clone file:///path/to/source/repo file:///path/to/dest/repo # another way to specify local directories.
This way we are sure git does not use hard links when cloning source repo.$ git clone --no-hardlinks source_local_repo dest_local_repo # clone a repository and copy object files instead of using hardlinks for local repo objects.

GIT SVN
Git svn is a tool that allows us to use git over a svn repo. It provides a bidirectional flow of changes between a Subversion and a git repository.

SHOW DIFFERENCES$ git diff # shows changes between current files and latest commit.$ git diff HEAD # Same as previous one.$ git diff HEAD~1 # Shows differences between current files and previous to latest post.$ git diff HEAD~2 HEAD~1 # Shows differences between one commit before last one and two commits before.$ git diff commit_1 commit_2 # shows differences between commit_2 and commit_1. $ git log shows commit IDs.
It is not needed to write commit names entiretly, only first characters to match them unmistakably.

$ git diff branch_1 branch_2 # shows differences between HEAD in branch_1 and HEAD in branch_2.$ git diff branch_1 branch_2 directory # shows differences for that directory between HEAD in branch_1 and HEAD in branch_2.

You should set name and email before any commit, because config changes will only affect future commits.
Existing commits will retain the info they were committed with.
There are two ways, setting environment variables or changing global config settings.

Setting environment variables
i.e: GIT_COMMITTER_NAME, GIT_COMMITTER_EMAIL, GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL
This will override git-config settings if they are defined.