This command use, if you want to start a new empty repository or to reinitialize an existing one in the project root. It will create a .git directory with its subdirectories.
Define the author name to be used for all commits by the current user.
Define the author email to be used for all commits by the current user.
List of all changes in local which files are staged, unstaged, and untracked.
Show unstaged changes between your index and working directory. It helpfull to see whats new changes performed, by compairing to older.
Stage all changes in <"directory"> for the next commit. Replace <"directory"> with a <"file"> to change a specific file. To stage specific <"file"> for commit.
Add all changes in <"directory"> to stagged at once for the next commit. All changes are stagged for commit.
Commit the staged snapshot, but instead of launching a text editor, use <"message"> as the commit message.
Replace <"message"> with "commit message".
Commit message should follow related task or change.
Change commit message in local.
Replace the last commit with the staged changes and last commit combined. Use with nothing staged to edit the last commit’s message
Create a new connection to a remote repo. After adding a remote, you can use <"name"> as a shortcut for <"url"> in other commands.
Create a new Repo on remote and connect with local.
List all of the branches in your repository.
Create a new branch with the given name(<new_branch_name>). Branch name should relate to your work.
Rename a branch while pointed to any branch.
Switch on branch named <branch_name>.
Create and check out a new branch named <branch_name>.
First make sure you are not on that banch. To delete branch named <branch_name>.
Delete branch named <"remote_branch_name"> from remote.
Push the branch to <"remote">, along with necessary commits and objects. Creates named branch in the remote repo if it doesn’t exist.
This is a shorthand for pulling commits into local branch that is tracking a remote branch.
Let's say you are on local/master, and run this command, git will fetch commits from origin/master and then merge it into local/master.
If some change (codes) don't want to commit but keep changes for future use(commit).
If some change (adding newFile) don't want to commit but keep changes for future use(commit).
From multiple changes you don't want to commit some, then stash that by [paths you wish to stash e.g. src/] for future commit.
Lists all stashed file or directory.
To clear all stashed lists.
Reset staging area to match most recent commit, but leave the working directory unchanged.
Reset staging area and working directory to match most recent commit and overwrites all changes in the working directory.
To discard all recent change in working directory.
Delete the most recent local commit if not pushed, keeping the work you've done.
Switch on master branch and pull once. Change branch name as your need.
Clone repo located at <"repo"> onto local machine. Original repo can be located on the local filesystem or on a remote machine via HTTP or SSH.
Clone remote repository into your local.
Get all the updates from the remote repository, including new branches.
It will give the name of the remote repository e.g, "origin" or "upstream".
It will give the name as well as the url of the remote repository.