Git Cheat Sheet 1
Check Setting
$ git config --global --list
# If you want to check your global settings
$ git config --list
# If you want to check your local repository
User Name
$ git config user.name "John Doe"
# set your username for a specific repository
$ git config --global user.name "John Doe"
# global set your username for every repository on your computer:
$ git config user.name
# Confirm that you have set your username correctly
User Email
$ git config user.email
#Setting your email address for a single repository.
$ git config user.email
# Confirm that you have set your email address correctly
$ git config --global user.email "
# Setting your email address for every repository on your computer
$ git config --global user.email
# Confirm that you have set your email address correctly
Getting Help
$ git help config
# Displays git-config(1) Manual Page. Launching default browser to display HTML ...
$ git help git
# Display the git[1] Manual Page. Launching default browser to display HTML ...
$ git help --help
# Display the git-help(1) Manual Page . Launching default browser to display HTML
$ git help log
# Display git-log(1) Manual Page. Launching default browser to display HTML ...
Modify some files
$ git add yourfile.txt
# Modify some files, then add their updated contents to the index: (Open and Modifty yourfile.txt file than save yourfile.txt file)
git diff --cached
$ git diff --cached
# see what is about to be committed using git diff with the --cached option
git commit
$ git commit
# Record changes to the repository, to actually record the snapshot.
git commit -a
$ git commit -a
# automatically stage all tracked, modified files before the commit