Google News
logo
Git - Interview Questions
What are the common Git commands and their uses?
git config” : Configure the username and email address
 
git add” : Add one or more files to the staging area

git commit” : Commit changes to head but not to the remote repository

git diff” : helps in showing changes between commits and those between commits and working tree.
 
git status” : helps in showing differences between the index and working directories
 
git stash applies” : is the command for bringing back saved changes on the working directory
 
git log” : helps in finding a specific commit in the history

git init” : Initialize an empty Git repository
 
git checkout” : is the command for updating directories of the working tree with directories from another branch without merging
 
git rm” : helps in removing files from staging area and files on the disk
 
git reset” : command helps in resetting the index. It also helps in resetting working directory to the state of the last commit
 
git is a tree” : is ideal for the representation of a tree object alongside the mode and name for each item
Advertisement