git initInitializes a new Git repository in the current directory.
Task-based lookup for everyday Git workflows. Use it when you know what you want to do and need the command quickly; deeper Git concepts remain in BrounStack's existing learning material.
git initInitializes a new Git repository in the current directory.
git clone <url>Creates a local copy of an existing remote repository.
git statusShows branch information plus tracked, modified, staged and untracked files.
git config --global user.name "Your Name"Sets the default author name used for commits on the machine.
git add <file>Stages a specific file for the next commit.
git add .Stages current-directory changes. Review with git status before committing.
git diffShows unstaged changes in tracked files.
git diff --stagedShows changes currently staged for the next commit.
git commit -m "message"Creates a commit from staged changes with a short message.
git rm <file>Removes a tracked file and stages that removal.
git logShows commit history for the current branch.
git log --onelineShows a compact one-line view of commit history.
git show <commit>Displays details and changes for a specific commit.
git blame <file>Shows which commits last changed individual lines in a file.
git branchLists local branches.
git switch -c <branch>Creates a new branch and switches to it.
git switch <branch>Switches to an existing branch.
git merge <branch>Merges the named branch into the currently checked-out branch.
git branch -d <branch>Deletes a local branch when Git considers it safely merged.
git stashTemporarily stores tracked working changes so you can work with a cleaner tree.
git remote -vLists configured remote names and URLs.
git remote add origin <url>Adds a remote named origin.
git fetchDownloads remote refs and objects without merging them into your current branch.
git pullFetches and integrates changes for the configured upstream branch.
git pushUploads local branch commits to its configured remote branch.
git push -u origin <branch>Pushes a branch and sets its upstream tracking relationship.
git restore <file>Restores a working-tree file from the index; review the change before using it because uncommitted edits can be lost.
git restore --staged <file>Removes a file from the staging area while keeping its working-tree changes.
git revert <commit>Creates a new commit that reverses the selected commit, preserving shared history.
git stash popReapplies the most recent stash and removes it if the application succeeds.