Interactive local ↔ remote simulator + 27 command reference. Start with git init.
No repository yet.
Click git init to get started.
Remote not connected yet.
It will sync once you push commits.
Run git init to create a repository.
git initSetupInitialize a new local repository.
git clone <url>SetupCopy a remote repository to your machine.
git config --global user.nameSetupSet your name for all commits.
git config --global user.emailSetupSet your email for all commits.
git statusBasicShow which files are changed, staged, or untracked.
git add <file>BasicStage a specific file → Staging Area.
git add .BasicStage ALL changed files at once.
git commit -m "msg"BasicSnapshot staged files into the local repo.
git logBasicShow the full commit history.
git diffBasicShow unstaged changes line by line.
git branchBranchList all local branches.
git branch <name>BranchCreate a new branch at the current commit.
git checkout <branch>BranchSwitch to an existing branch.
git checkout -b <branch>BranchCreate AND switch to a new branch.
git merge <branch>BranchMerge another branch into the current branch.
git rebase <branch>BranchReapply commits on top of another base commit.
git branch -d <branch>BranchDelete a branch (safe — only if fully merged).
git remote add origin <url>RemoteConnect your local repo to a remote.
git push origin <branch>RemoteUpload local commits to the remote branch.
git pullRemoteFetch + merge remote changes into local.
git fetchRemoteDownload remote refs WITHOUT merging.
git push -u origin <branch>RemotePush and set upstream tracking (first push).
git restore <file>UndoDiscard unstaged changes — back to last commit.
git restore --staged <file>UndoUnstage a file → Working Dir.
git reset HEAD~1UndoUndo last commit, keep changes as unstaged.
git stashUndoTemporarily save uncommitted changes.
git stash popUndoRestore the most recent stash.
git rebase -i HEAD~nAdvancedInteractively edit, squash, reorder, or drop the last n commits.
git cherry-pick <hash>AdvancedCopy a specific commit from any branch onto the current branch.
git bisect startAdvancedBegin a binary search through commits to find which one introduced a bug.
git reflogAdvancedView all HEAD movements — rescue lost commits and deleted branches.
git tag -a <name> -m "msg"AdvancedCreate an annotated tag pointing to the current commit — ideal for releases.
git stash listAdvancedShow all stashed changesets with their index and description.
git clean -fdAdvancedRemove all untracked files and directories from the working tree.
git diff HEAD~1AdvancedShow changes between the current working tree and the previous commit.