This is a sandbox repository for playing with git.
To install git on your machine visit - official git website and select the platform of your choice.
$ git config --global user.name "[name]"
Sets the name you want attached to your commit transactions
$ git config --global user.email "[email]"
Sets the email you want attached to your commit transactions
$ git config --global color.ui auto
Enables helpful colorization of command line output
Start a new repository or obtain one from an existing URL
$ git init [project-name]
Creates a new local repository with the specified project-name
$ git clone [url]
Create a local copy of a remote repository
Review and commit changes
$ git status
Lists all changes (new as well as modified)
$ git diff
Show differences in files, that have not been staged, with last comitted version.
$ git add [file]
Stages the file specified for commit
$ git reset [file]
Unstages the file specified
$ git commit -m "[decriptive message]"
Records the changes permanently in version history.
$ git branch
List all local branches in the current repository
$ git branch [branch-name]
Creates a new branch with specified name
$ git checkout [branch-name]
Switches the working directory to the specified branch
$ git merge [branch-name]
Combines the specified branch's history into the current working directory
$ git branch -d [branch-name]
Deletes the specified branch
$ git rm [file]
Deletes the file from the working directory and stages the deletion
$ git rm --cached [file]
Deletes the file from version control and stages deletiong but preserves the file locally
$ git mv [file-original] [file-renamed]
Changes the file name and stages the changes for commit
$ git log
Lists version history for the current branch
$ git show [commit]
Shows the changes made for the specified commit
$ git fetch [remote]
Downloads all history from the remote repository
$ git push [remote] [branch]
Uploads all local commits to remote
$ git pull
Downloads history from remote repository and incorporates changes into local repository
Exclude files and paths
A text file name .gitignore
avoids accidental versioning of files and paths matching the specified pattern.
For example consider a .gitignore file containing the following: *.log build/
In this case all files ending with .log and the build folder will be ignored by git.
For detailed documentation on git visit - Git Documentation