Blog
Mert Özen's blog posts on software development, backend, frontend, and DevOps.
Tracking Files with Git: .gitignore, git rm --cached and git mv
We look at .gitignore patterns, exceptions with ! and how git check-ignore -v shows which rule applies. We see why an already committed .env stays tracked despite .gitignore and how git rm --cached untracks it, then cover global excludes, git mv and line endings with .gitattributes.
Inside a Git Commit: Snapshots, Objects and Hashes
We open commit, tree and blob objects with git cat-file to see that a commit is a snapshot, not a diff, compute a hash by hand with shasum and find out why an unchanged file is not stored twice. We cover the rules of a good commit message and why git commit --amend creates a new commit.
Your First Git Repo: git init, the Staging Area and the First Commit
We build the bookstore repo from scratch with git init and take a first look inside the .git folder. We walk through the working tree, staging area and repository with git status, git add and git commit, and learn to read the two columns of status -s and why an MM file commits its staged version.
Installing Git and First Settings: Starting Right with git config
We install Git on macOS, Windows and Linux, check the version and look at the system/global/local config layers, user.name and user.email, why init.defaultBranch main matters, core.editor and core.autocrlf. We compare the git config list/get/set/unset subcommands (2.46+) with the old --get form.
What Are Git and GitHub? An Introduction to Version Control
Why version control exists, how centralized and distributed tools differ and why Git and GitHub are not the same thing. We try distributed work by reading history and committing in a clone whose server is gone, then look at Git's short history, its place in DevOps and how the series is organized.