Commands.app
📦

Git Commands

Version control system commands

25 commands found
git init
Initialize a new Git repository
Repository Setup
git init
git clone
Clone a repository into a new directory
Repository Setup
git clone https://github.com/user/repo.git
git status
Show the working tree status
Basic Workflow
git status
git add
Add file contents to the staging area
Basic Workflow
git add file.txt
git commit
Record changes to the repository
Basic Workflow
git commit -m 'Add new feature'
git push
Update remote repository with local commits
Remote Operations
git push
git pull
Fetch and integrate changes from remote repository
Remote Operations
git pull
git fetch
Download objects and refs from remote repository
Remote Operations
git fetch
git branch
List, create, or delete branches
Branching
git branch
git checkout
Switch branches or restore files
Branching
git checkout main
git merge
Join two or more development histories together
Branching
git merge feature-x
git rebase
Reapply commits on top of another base tip
Branching
git rebase main
git log
Show commit logs
History
git log
git diff
Show changes between commits, commit and working tree, etc
History
git diff
git stash
Stash changes in a dirty working directory
Workflow
git stash
git reset
Reset current HEAD to specified state
Workflow
git reset HEAD~1
git tag
Create, list, or delete tags
Workflow
git tag v1.0.0
git remote
Manage set of tracked repositories
Remote Operations
git remote -v
git config
Get and set repository or global options
Configuration
git config --global user.name "Your Name"
git show
Show various types of objects
History
git show
git revert
Revert commits by creating new commit
Workflow
git revert HEAD
git switch
Switch branches (newer alternative to checkout)
Branching
git switch main
git restore
Restore working tree files
Workflow
git restore file.txt
git cherry-pick
Apply changes from specific commits
Advanced
git cherry-pick <commit-hash>
git clean
Remove untracked files
Workflow
git clean -n