
A feature branch usually ends up with a few commits nobody will want to read later. Squashing folds them into one new…

A plain git commit records the contents of the index and nothing else. The index is…

Commit hashes work fine for Git and badly for people. A tag fixes that by putting…

Most people meet the word origin by pasting a command from a README, and they never…

Most people meet version control the hard way, usually through a folder full of files named…

Most of the confusion around git commit comes from assuming it saves your files. It saves…

Most people meet git reset right after a commit they wish they hadn’t made. The command…

git merge takes the commits from one branch and puts them into the branch you have…

Most people land on GitHub because someone sent them a repository link and said “clone this.”…

Before you type anything, work out which way the commits need to travel. Pushing sends your…

Git stopped accepting account passwords over HTTPS a while back, so typing yours at a prompt…

GitHub’s web interface can’t delete a commit. The closest thing is a Revert button on merged…

Open the pull request, click Resolve conflicts, edit each marked file and click Commit merge. If…

Open Settings, go to Account, click Change username, and pick a name nobody else holds. Personal…

Two commands, git add and git commit -m, build a snapshot in the local repository. A…

The green merge button doesn’t look the same on every repository. Some show one option, some…

Most of the time, unstaging a file in Git is one command: git restore –staged <file>.…












