Tag Archives: Git

Git Add

git add is the command that stages changes from your working directory into Git’s index, marking them to be included in the next commit. Staging is an intermediate step that gives you precise control — you can add one file at a time, leaving other modified files unstaged until a later commit. This is the third post in this site’s Git command guide, following Git Clone.

Continue reading Git Add

Git Status

git status shows you the current state of your working directory and staging area — which files are tracked, which have been modified, which are staged for the next commit, and which Git doesn’t know about at all. It’s the command I run more than any other Git command, usually right before deciding what to do next. This is the sixth post in this site’s Git command guide, following Git Commit.

Continue reading Git Status

Git Init

git init is the command that turns an ordinary folder into a Git repository. It creates a hidden .git subdirectory containing the object database, refs, and config that Git needs to start tracking history. You only run it once per project — after that, every git add and git commit writes into that same .git directory. This is the first post in this site’s Git command guide, so if you’re setting up a brand-new project, this is where you start.

Continue reading Git Init

Git: Delete Last Commit

Everyone who’s used Git for long enough has committed something they didn’t mean to — a debug print left in, a config file with the wrong values, a commit message that’s just “wip.” The fix depends entirely on one question: has that commit been pushed anywhere yet? This post walks through both cases. It’s the twelfth post in this site’s Git command guide, following Git Log.

Continue reading Git: Delete Last Commit

Git – Autocorrect Spelling

Git has a built-in typo handler that most people never turn on: help.autocorrect. By default Git just suggests the command it thinks you meant, but you can configure it to run the correction automatically, with or without a delay. This is the thirteenth and last post in this site’s Git command guide — a smaller, more personal config topic to close out with, following Git: Delete Last Commit.

Continue reading Git – Autocorrect Spelling