Cloning a remote repository:
$ git clone https://github.com/OpenVPN/openvpn-build.git
Cloning a remote repository with preserving UNIX-style line endings:
$ git clone https://github.com/OpenVPN/openvpn-build.git --config core.autocrlf=false
Checking out the status of the current local repository:
$ git status
Getting a list of all remote branches:
$ git branch -r
origin/HEAD -> origin/master
Checking out the emote branch:
$ git checkout -b
$ git checkout -b release/2.3 origin/release/2.3
Branch release/2.3 set up to track remote branch release/2.3 from origin.
Switched to a new branch 'release/2.3'
Adding changed file (already tracked but modified) or new file to the commit:
$ git add my_file
Saving changes in the repository:
$ git commit
Previous two actions can be done in one go with the following:
$ git commit -a
To view all differences in modified file:
$ git diff my_file
To view all differences in all modified files in the current directory:
$ git diff .