العودة إلى القاموس
Git والتحكم بالإصدارات

Commit

A snapshot of changes in a Git repository that records modifications to files along with a message describing what changed and why.

التعريف

A commit is Git's fundamental unit of change. Each commit has a unique SHA-1 hash identifier, contains the actual file changes (diff), author information, timestamp, and a commit message. Commits form a linked list (each pointing to its parent), creating the repository's history. Good commit practices include atomic commits (one logical change per commit) and descriptive messages.

لماذا هو مهم

Well-structured commits make code review easier, enable precise rollbacks, and create a readable project history. The conventional commits specification helps teams maintain consistent commit messages. Tools like git bisect use commits to find when bugs were introduced.

مثال

After fixing a login bug, a developer stages the changed files and runs: git commit -m "fix: resolve session timeout on mobile Safari browser". This creates a permanent record of the fix.

المصطلحات ذات الصلة

git commitwhat is commitcommit meaninggit commit message

أتمتة مراجعة الكود مع diffray

نظام ذكاء اصطناعي متعدد الوكلاء لمراجعة الكود. يجد الأخطاء والثغرات الأمنية ومشاكل البنية تلقائياً.