Linux Commands Reference - Complete Linux Command Guide

Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.

Share
Back to commands

git

Distributed version control system

Syntax

git [OPTION]... COMMAND

Common Options

initInitialize repository
cloneClone remote repository
addAdd to staging area
commitCommit changes
pushPush to remote
pullPull remote updates
branchManage branches
mergeMerge branches
logView commit history
statusShow working tree status
diffShow differences
stashStash changes

Common Examples

git init

Initialize new repo

git clone https://github.com/user/repo.git

Clone remote repo

git add . && git commit -m "feat: add feature"

Add and commit

git push origin main

Push to remote main

git log --oneline -10

Show last 10 commits

git stash && git pull && git stash pop

Stash, pull, pop

Related Commands

Related Tools

More Code & Dev Tools