Usage: git init
This command is used to start a new repository.
Usage: git config –global user.name “[name]”
Usage: git config –global user.email “[email address]”
This command sets the author name and email address respectively to be used with your commits.
usage: touch(file name with extension)
This command is used to create new and empty files in the repository.
Usage: git add [file]
This command adds a file to the staging area.
Usage: git status
This command lists all the files that have to be committed.
Usage: git push [variable name] master
This command sends the committed changes of master branch to your remote repository
Usage: git pull [Repository Link]
This command fetches and merges changes on the remote server to your working directory.
Usage: git merge [branch name]
This command merges the specified branch’s history into the current branch.
Usage: git stash save
This command temporarily stores all the modified tracked files.
Usage: git remote add [variable name]
This command is used to connect your local repository to the remote server.
Usage: git log
This command is used to list the version history for the current branch.
Usage: git rm [file]
This command deletes the file from your working directory and stages the deletion.
Usage: git diff
This command shows the file differences which are not yet staged.
Usage: **git clone [url] **
This command is used to obtain a repository from an existing URL.
usage: git branch
This command lists all the branches available in the repository.
usage: git show [commit]
This command is used to show the metadata and content changes of specified commit.
usage: git fetch
This command is used to download branches and tag from one or more repositories.
usage: git checkout
This command is used to switch between branches in a repository.