Explore tens of thousands of sets crafted by our community.
Common Git Commands
20
Flashcards
0/20
git log
Shows the commit logs
git push [alias] [branch]
Pushes commits made on a local branch to a remote repository
git merge [branch]
Merges specified branch’s history into the current branch
git checkout [branch-name]
Switches to a specified branch and updates the working directory
git fetch [alias]
Downloads objects and refs from a remote repository
git status
Displays the state of the working directory and staging area
git rm [file]
Removes files from the working directory and staging area
git config --global user.name "[name]"
Sets the name that will be attached to your commits and tags
git add [file]
Adds a file to the staging area
git pull [alias] [branch]
Fetches changes from the remote repository and merges them into the local branch
git tag
Creates, lists, deletes or verifies a tag object signed with GPG
git init
Initializes a new Git repository
git clone [url]
Clones a repository into a new directory
git show [commit]
Displays information about a git object such as a commit
git commit -m "[message]"
Records file snapshots in the version history
git stash
Temporarily stores all modified tracked files
git remote -v
Lists all remote repositories
git reset
Resets the staging area to match the most recent commit, but leaves the working directory unchanged
git branch
Lists, creates, or deletes branches
git diff
Shows the differences not yet staged
© Hypatia.Tech. 2024 All rights reserved.