.gitignore Generator - Online for Any Tech Stack
Select your OS, IDE, and programming language to generate a complete .gitignore file. No typing required.
UD5 Toolkit
Quick reference for the most essential Git commands โ search, copy & go
Set the author name for all commits on this machine.
Example git config --global user.name "John Doe"Set the email address for all commits on this machine.
Example git config --global user.email "john@example.com"Initialize a new Git repository in the current directory.
Example cd my-project && git initClone a remote repository to your local machine.
Example git clone https://github.com/user/repo.gitList all Git configuration settings for the current repository.
Example git config --list --show-originStage a specific file for the next commit.
Example git add index.htmlStage all changed files in the current directory for the next commit.
Example git add .Commit staged changes with a descriptive message.
Example git commit -m "Fix login bug"Show the working tree status โ staged, unstaged, and untracked files.
Example git status -s (short format)Show unstaged differences between the working tree and the index.
Example git diff HEAD (all changes including staged)Display the commit history of the current branch.
Example git log --oneline -10Remove a file from the working tree and stage the removal.
Example git rm --cached file.log (keep locally)Move or rename a file and stage the change.
Example git mv old-name.js new-name.jsList all local branches. The current branch is highlighted with an asterisk.
Example git branch -a (list all including remote)Create a new branch at the current commit.
Example git branch feature-loginDelete a local branch (only if already merged).
Example git branch -D feature-old (force delete)Switch to an existing branch.
Example git checkout mainCreate a new branch and switch to it immediately.
Example git checkout -b feature-dark-modeSwitch to an existing branch (modern alternative to checkout).
Example git switch mainCreate a new branch and switch to it (modern alternative to checkout -b).
Example git switch -c feature-apiList all remote connections with their URLs.
Example git remote -vAdd a new remote repository connection.
Example git remote add origin https://github.com/user/repo.gitDownload objects and refs from a remote without merging.
Example git fetch originFetch from a remote and merge into the current branch.
Example git pull origin mainPush local commits to a remote branch.
Example git push origin feature-loginPush and set the upstream tracking reference (first push for a new branch).
Example git push -u origin feature-apiRemove a remote connection from the repository.
Example git remote remove upstreamTemporarily save all uncommitted changes and revert to a clean working tree.
Example git stash save "WIP: refactoring auth"Restore the most recently stashed changes and remove them from the stash list.
Example git stash pop stash@{0}List all stashed changesets.
Example git stash list --statApply stashed changes without removing them from the stash list.
Example git stash apply stash@{1}Remove a specific stash from the stash list.
Example git stash drop stash@{0}Remove all stashed entries. This action is irreversible!
Example git stash clearDisplay commit history in a compact one-line-per-commit format.
Example git log --oneline -20Visualize the full commit tree with branch and tag references.
Example git log --graph --all --decorate --onelineShow detailed information about a specific commit.
Example git show HEAD~2Show who last modified each line of a file and when.
Example git blame src/app.js -L 10,30Show a log of all reference updates (HEAD movements). Useful for recovering lost commits.
Example git reflog -10Show differences between two branches.
Example git diff main...feature-loginUnstage a file while keeping its changes in the working directory.
Example git reset index.htmlReset HEAD to a specific commit and discard all changes. Use with caution!
Example git reset --hard HEAD~1Undo the last commit but keep all changes staged.
Example git reset --soft HEAD~1Create a new commit that reverses the changes of a specified commit.
Example git revert abc1234Discard uncommitted changes in a file (modern alternative to checkout --).
Example git restore app.jsUnstage a file without losing its changes (modern alternative to reset).
Example git restore --staged index.htmlRemove all untracked files and directories. Use with caution!
Example git clean -fdn (dry run first!)List all tags in the repository.
Example git tag -l "v2.*"Create a lightweight tag at the current commit.
Example git tag v1.0.0Create an annotated tag with a message (recommended for releases).
Example git tag -a v2.0.0 -m "Release version 2.0.0"Push a specific tag to the remote repository.
Example git push origin v1.0.0Push all local tags to the remote repository.
Example git push origin --tagsDelete a local tag.
Example git tag -d v1.0.0 && git push origin :refs/tags/v1.0.0Merge a branch into the current branch.
Example git merge feature-loginAbort the current merge process and return to the pre-merge state.
Example git merge --abortReapply commits from the current branch on top of another branch.
Example git rebase mainContinue the rebase process after resolving conflicts.
Example git rebase --continueAbort the rebase process and return to the original branch state.
Example git rebase --abortApply the changes from a specific commit to the current branch.
Example git cherry-pick abc1234git reset --soft HEAD~1 โ Undo the commit but keep all changes staged.git reset HEAD~1 โ Undo the commit and unstage changes (keep them in working directory).git reset --hard HEAD~1 โ Completely discard the commit and all changes (use with caution!).git revert HEAD โ Create a new commit that reverses the last commit (safer for shared branches).
<<<<<<<, =======, and >>>>>>>. To resolve:git add [file].git commit (or git merge --continue).git merge --abort.
git fetch downloads new data from the remote repository but does not integrate it into your working files. It's safe and lets you inspect changes before merging. git pull is essentially git fetch followed by git merge โ it downloads and immediately merges the remote changes into your current branch. Use git fetch when you want to review changes first; use git pull when you're ready to integrate.
git stash temporarily saves uncommitted changes and reverts your working directory to a clean state. Use it when you need to switch branches but aren't ready to commit your current work. Later, restore your changes with git stash pop or git stash apply. Stashes are stored in a stack, and you can have multiple stashes. Use git stash list to see them all.
git rebase moves or reapplies commits from one branch onto another, creating a cleaner, linear commit history. It's preferred over merging when you want to keep the history tidy and avoid unnecessary merge commits. However, avoid rebasing commits that have already been pushed to a shared repository โ it rewrites history and can cause problems for collaborators. Use interactive rebase (git rebase -i) to squash, reorder, or edit commits.
git branch -d [branch-name] (safe, only if merged) or git branch -D [branch-name] (force delete).git push origin --delete [branch-name] or git push origin :[branch-name]..gitignore file tells Git which files or directories to ignore in a project. Create a .gitignore file in your repository root and list patterns for files to exclude โ such as build outputs, dependency folders (node_modules/), environment files (.env), and OS-specific files (.DS_Store). You can find templates for various languages at github.com/github/gitignore. Files already tracked by Git won't be affected; use git rm --cached [file] to untrack them.
git checkout -b [new-branch-name]. This is a common situation when exploring old commits or tags.
Select your OS, IDE, and programming language to generate a complete .gitignore file. No typing required.
Calculate how long it will take to pay off credit card debt with fixed monthly payments or a payoff goal. Understand interest costs fully.
Calculate grout needed (lbs or kg) based on tile size, grout joint, and area. Also recommend spacer size. Local estimator.
Input camera sensor, focal length, aperture, distance to get hyperfocal distance and DoF range. Visual chart.
Enter a package name and version range to see all satisfying versions from the registry. Understand ^ and ~.
Determine your ideal daily macronutrient intake based on TDEE, goal, and diet preference. Free nutrition planning tool with local computation.
Type a line and see syllable count as you write. Generate nature-themed prompts. Poetry aid.
Interactive scale showing dB levels of everyday sounds with playable samples. Hearing safety.
Calculate the output voltage and resistor values for a voltage divider circuit. Includes schematic. Handy for electronics hobbyists and engineers.
Based on your calorie goal, get the perfect gram split of proteins, carbs, and fats. Adjust ratios. For fitness and health.
Simulate rolling dice for board games, RPGs, and decision making. Choose number of dice and faces. Fun, lightweight, and no download required.
Calculate how much pure ammonia to add to reach 4ppm for a fishless cycle. Safe start guide.
Calculate how much fertilizer to add based on desired NโPโK ppm and water volume. For hydroponics and soil growers.
Calculate how many planks you need to cover an area given plank dimensions and gap. Quick carpentry estimator. Local only.
Estimate how much agricultural lime or elemental sulfur to add to change soil pH by a target amount. Based on soil type and current pH. Educational.
Calculate antenna element lengths for a given frequency (or vice versa). Supports 1/4 wave, 1/2 wave, dipole. Useful for ham radio. Local only.
Learn what water is safe (rain, distilled, low PPM) for pitcher plants and flytraps. Visual PPM scale.
Enter standard dice notation (e.g., 2d8+3, 4d6k3) and see the roll result and individual dice. Must for tabletop RPG.
Perform arithmetic on fractions and get simplified results. Handles mixed numbers and improper fractions. Step-by-step display. Educational and precise.
Enter a CSS value in vw/vh and see the actual pixel size at current viewport. Dynamic resize demo.
Convert diopter strength to approximate magnification and working distance for macro photography.
Calculate how many vegetable plants fit in a given area using square foot gardening or row spacing. Visual plant grid. Plan your spring garden.
Enter tank volume and recommended dose to find exact ml or capfuls needed. Avoid overdosing fish.
Enter current ball size and target to find approx rubber bands required. Fun and satisfying.
Enter log pile dimensions to calculate cords and face cords. Also estimate heat content in BTUs by wood species. Local reference.
Calculate how much water to change weekly to keep nitrates under control. Based on current nitrate level, desired level, and tank volume.
Calculate corrected (adjusted) age for premature infants based on birth date and due date. Important for developmental milestone tracking. Local only.
Find out how large you can print based on image resolution in pixels. Understand DPI and megapixels.
Find the optimal TV size for your room or the best viewing distance based on screen size and resolution (1080p, 4K, 8K). Simple THX/SMPTE reference.
Calculate resistor values for transistor fixed bias or voltage divider configuration. Quick quiescent point analysis.