git init ->To create a new git local repository on your PC.
git status ->To view listed files you have changed and those file you still need to add or commit.
git config --global user.name "Your name"->declare who you are (onetime needed).
git config --global user.email “your email”->declare your email (one time needed).
git config –list ->To see User name and user email which is use this repository.
git add filename ->Add one(single) file to Staging.
git add --a ->Add all files to staging together.
git log ->This command is used to check the commit history on git.
git log –oneline -> To View log history shortly.
git diff -> use this command to different between working directory and staging area latest change.
git diff –stage ->after staging show what you change before.
git show gitnumber ->To show your changees which i done previously. To find gitnumber command: git log –oneline.
git diff 1gitNum 2gitNum->To show defferent(how ever change) between git 1 & git 2.
git diff head -> use this command to different between working directory and local repository.
git commit -m "mass" ->Commit changes to head locally final stage(but not yet to the remote repository).
git push origin branchname ->Send changes to the master branch of your remote repository(github);
git pull origin branchname ->To merge changes on the remote server to your local working directory on your PC.
git fatch ->from copy remote to local repo.
git clone url ->To Create a working copy of a git local repository from github.
git remote ->To check connectivity local working directory to remote server.
git remote –v ->To check connectivity remote repository.
git brunch ->To list all the branches in your repository, and also tell you what branch you're currently work.
git branch branchname->To create new branch.
git checkout –b new branchname->To create and checkin branch together.
git checkout branchname ->Switch from one branch to another branch.
git marge branchname ->To merge a different branch into your active branch.
git brance –d branch name-> delete branch.
git clean -f ->To remove local file.
git clean -fd ->To remove from directories.
git clean -fx ->To remove ignored and non-ignored files.
touch filename-> Create new file on local derectory.
Rm filename -> Delete File From local derecority.
git reset HEAD filename->delete from staging area. After commit must.
rm -rf .git ->To remove a file from a Git repository and your working directory but not remove on pc.we can work again Git repository those file.
git fatch origin->Instead, to drop all your local changes and commits, fetch the latest history from the server and point your local master branch at it, do this if connected with remote to github.