Following are some of the most commonly and effective git commands, that can be used in daily routine.
git configThis is a configuration command to sets the author name and email address , which can be refer during the time of code commits.
git init
This command is used to initialize/start a new repository.
git clone
This command is used to clone a copy of existing git repository into local system.
git add .
This command is used to add all newly created files on the git staging area.
git commit
This command used to commit all changes in local system, and keep it ready in pipeline of version control.
git diff
This command display the differences in the working files, which are not in the staged pipeline.
git reset
This command reset the file to unchanged state.
git status
This command lists all the files that were changed and yet to be committed
git log
This command is used to list the history of each version, for the current branch.
git branch
This is used to list all the available branch in the current repository.
git checkout
This is used to switch to another branch that are available in the current repository.
git merge
This uses to merge the mention branch’s history into the current branch.
git remote
This command is used to connect your local repository to the remote server.
git push
This uses to send the committed changes of branch to your remote repository.
git pull
This uses to fetch all the available resources in the repository , to keep sync with th elocal branch of the current repository.
git stash
This uses to delete all the upstaged work from the current branch, and keep them in the temporary storage. Which can also be added back to current working branch.

0 Comments