Files
mintlify__docs/git/overview.mdx
2026-02-09 20:46:44 +00:00

72 lines
2.2 KiB
Plaintext

---
title: Git commands
description: Essential Git commands for version control and collaboration
---
Git is a distributed version control system that helps you track changes, collaborate with others, and manage your project history.
## Getting started
If you're new to Git, start with these essential commands:
- [git init](/git/init) - Initialize a new Git repository
- [git clone](/git/clone) - Copy an existing repository
- [git config](/git/config) - Configure your Git settings
## Basic workflow
These commands form the core Git workflow:
- [git status](/git/status) - Check repository status
- [git add](/git/add) - Stage changes for commit
- [git commit](/git/commit) - Save changes to repository
- [git log](/git/log) - View commit history
## Working with branches
Branches let you work on features independently:
- [git branch](/git/branch) - List, create, or delete branches
- [git checkout](/git/checkout) - Switch between branches
- [git merge](/git/merge) - Combine branches
- [git rebase](/git/rebase) - Reapply commits on top of another branch
## Syncing with remotes
Share your work with remote repositories:
- [git remote](/git/remote) - Manage remote repositories
- [git fetch](/git/fetch) - Download objects from remote
- [git pull](/git/pull) - Fetch and merge changes
- [git push](/git/push) - Upload local changes
## Inspecting changes
Review and compare your work:
- [git diff](/git/diff) - Show changes between commits
- [git show](/git/show) - Display commit details
- [git blame](/git/blame) - Show who modified each line
## Undoing changes
Fix mistakes and revert changes:
- [git reset](/git/reset) - Undo commits or unstage files
- [git revert](/git/revert) - Create new commit that undoes changes
- [git restore](/git/restore) - Discard changes in working directory
- [git stash](/git/stash) - Temporarily save changes
## Advanced operations
For more complex workflows:
- [git tag](/git/tag) - Mark specific points in history
- [git cherry-pick](/git/cherry-pick) - Apply specific commits
- [git reflog](/git/reflog) - View reference logs
## Next steps
- Read the [Git concepts guide](/guides/git-concepts) to understand how Git works
- Learn about [working with branches](/guides/branches)