Skip to main content

Book 06

Version Control

Git concepts for tracking code changes and collaborating as a team.

Contents

  1. 01.gitignore1A .gitignore file is a plain-text file listing patterns for files and folders Git should not track, such as dependencies, build output, logs, and secrets.
  2. 02Branch2A branch in Git is an independent line of development that lets you work on a feature or fix in isolation, without affecting the main code until you merge it.
  3. 03Cherry-pick3A cherry-pick in Git copies the changes from one specific commit onto your current branch as a new commit, without merging the rest of the branch it came from.
  4. 04Code Review4A code review is the practice of having other developers check code changes before they are merged, to catch bugs, improve quality, and share knowledge.
  5. 05Commit5A commit is a saved snapshot of a project's files in Git, recorded with a unique ID, an author, a timestamp, and a message describing what changed.
  6. 06Conventional Commits6Conventional Commits is a specification for structured commit messages like feat: add search, so tools can write changelogs and pick versions automatically.
  7. 07Detached HEAD7A detached HEAD is a Git state in which you have checked out a specific commit instead of a branch, so any new commits you make don't belong to any branch.
  8. 08Fast-Forward Merge8A fast-forward merge happens when the target has no new commits since the other branch split off, so Git just moves its pointer ahead with no merge commit.
  9. 09Fork9A fork is a personal copy of someone else's repository on a hosting platform, letting you experiment freely and propose changes back to the original project.
  10. 10Git10Git is a free, open-source distributed version control system that tracks changes to files over time, so developers can collaborate and undo mistakes.
  11. 11Git Bisect11Git bisect is a Git command that uses binary search through commit history to find the exact commit that introduced a bug, testing only a few commits.
  12. 12Git Checkout12git checkout switches to another branch or commit, or restores files to an earlier version; newer Git splits these jobs into git switch and git restore.
  13. 13Git Clone13Git clone is a Git command that downloads a complete copy of an existing repository, including its full history, and sets it up on your computer for work.
  14. 14Git Diff14Git diff is a Git command that shows the exact line-by-line differences between two versions of your code, such as working files, staged changes, or commits.
  15. 15Git Fetch15git fetch downloads new commits, branches and tags from a remote and updates remote-tracking branches like origin/main but not your own branches or files.
  16. 16Git Hooks16Git hooks are scripts that Git runs automatically at certain points, such as before a commit or a push, to check code, enforce rules, or automate tasks.
  17. 17Git Pull17Git pull is a Git command that downloads new commits from a remote repository and immediately integrates them into your current local branch.
  18. 18Git Push18Git push is a Git command that uploads your local commits to a remote repository, updating the matching branch there so others can see and use your work.
  19. 19Git Remote19A Git remote is a named shortcut, such as origin, to another copy of your repository, usually on a server, that you push commits to and pull commits from.
  20. 20Git Reset20Git reset is a Git command that moves the current branch back to an earlier commit and, depending on its mode, also resets the staging area and your files.
  21. 21Git Revert21Git revert is a Git command that undoes an earlier commit by creating a new commit with the opposite changes, leaving the existing project history intact.
  22. 22Git Stash22Git stash is a command that temporarily saves uncommitted changes and cleans the working directory, so you can switch tasks and restore the work later.
  23. 23Git Tag23A Git tag is a named, permanent pointer to a specific commit, most often used to mark release versions such as v1.0.0 in a repository's history.
  24. 24Gitflow24Gitflow is a Git branching model that uses long-lived main and develop branches plus feature, release, and hotfix branches to manage scheduled releases.
  25. 25GitHub25GitHub is a platform for hosting Git repositories and working on code together, with pull requests, code review, issues and the largest open-source community.
  26. 26GitLab26GitLab is a Git hosting platform combining code review, issue tracking, CI/CD pipelines and security scanning in one application, in the cloud or self-hosted.
  27. 27HEAD27HEAD is Git's pointer to what you have checked out, normally the current branch, which points to its latest commit; new commits are added where HEAD points.
  28. 28Hotfix28A hotfix is an urgent fix for a serious problem in production, such as a crash or security hole, released quickly and outside the normal release schedule.
  29. 29Merge29A merge in Git combines the changes from one branch into another, joining separate lines of development back together into a single, shared history.
  30. 30Merge Conflict30A merge conflict happens when Git can't automatically combine two branches because both changed the same lines of a file, so a person must decide the result.
  31. 31Monorepo31A monorepo is a single version control repository that holds the code for many projects, such as several apps, services, and shared libraries, managed together.
  32. 32Pull Request32A pull request is a proposal to merge changes from one branch into another, giving teammates a place to review, discuss, and test the code before it is merged.
  33. 33Rebase33A rebase in Git replays a branch's commits on top of another commit, rewriting history to produce a cleaner, linear sequence of changes without merge commits.
  34. 34Repository34A repository is the storage location for a project, holding all of its files plus the complete history of every change recorded by a version control system.
  35. 35Semantic Versioning35Semantic versioning is a MAJOR.MINOR.PATCH numbering scheme in which each part signals whether a release breaks compatibility, adds features, or fixes bugs.
  36. 36Squash Merge36A squash merge combines all the commits from a branch into one new commit on the target branch, keeping the main history short and easy to read.
  37. 37Staging Area37The staging area in Git is a holding zone between your files and the next commit, where you place exactly the changes you want that commit to include.
  38. 38Trunk-Based Development38Trunk-based development is a branching strategy where developers merge small changes into one shared main branch at least daily, keeping it always releasable.
  39. 39Version Control39Version control is a system that records every change to a set of files, so you can see who changed what, return to earlier versions and work in parallel.

Back to the libraryNext book: Security

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings