Git commands
Questions & Answers
Git Commands
git add
- Add file contents to the index
git bisect
- Use binary search to find the commit that introduced a bug
git blame
- Show what revision and author last modified each line of a file
git branch
- List, create, or delete branches
git checkout
- Switch branches or restore working tree files
git cherry-pick
- Apply the changes introduced by some existing commits
git clean
- Remove untracked files from the working tree
git clone
- Clone a repository into a new directory
git commit
- Record changes to the repository
git config
- Get and set repository or global options
git diff
- Show changes between commits, commit and working tree, etc
git fetch
- Download objects and refs from another repository
git grep
- Print lines matching a pattern
git help
- Display help information about Git
git init
- Create an empty Git repository or reinitialize an existing one
git log
- Show commit logs
git merge
- Join two or more development histories together
git mv
- Move or rename a file, a directory, or a symlink
git pull
- Fetch from and integrate with another repository or a local branch
git push
- Update remote refs along with associated objects
git reflog
- Manage reference log information
git remote
- Manage set of tracked repositories
git reset
- Reset current HEAD to the specified state
git revert
- Revert some existing commits
git rm
- Remove files from the working tree and from the index
git show
- Show various types of objects
git stash
- Stash the changes in a dirty working directory away
git status
- Show the working tree status
git switch
- Switch branches
git tag
- Create, list, delete or verify a tag object signed with GPG
Can't find a solution to your git problem?
Contact us on githint@githint.com and we will add the solution to the site