
git level 0 in
https://oufok.com/article/view/bbf4ed3535714d8a8bc3d8f5e359a512/
git for windows version 2.41.0.3
اكتب git لمعرفة الأوامر الموجودة
git status --help
للحصول على مساعدة حول الأمر status
اكتب الأمر الخاطئ لترى الصحيح
git status --hlp
press q
اكتب
git --version
لمعرفة إصدار git
سنجعل المجلد مستودع repository
git init
كامل مشروعك إصداراته محفوظة في مجلد git.
الاسم بين () هو اسم الفرع الحالي
لتربط اسمك ب commitـات
اكتب
git config user.name "youshaa yousef"
اكتب
git config user.email "youshaa010yousef@yahoo.com"
git config user.name
git config user.email
"للتأكد إن لديك اسم و ايميل
git config --list
working tree aka local copy
كل ما هو معدل أو مضاف إلى المجلد بعد آخر commit
index aka staging area aka tracked content
كل ما هو مضاف من local copy بـ git add
اكتب
git status
لنرى حالة working tree
git status -s
إظهار status بشكل مختصر
git status --short
Discard uncommitted changes
git restore file_name
file_name become file_name that in commit_hash
git restore --source=<commit_hash> <file_name>
track .
git add .
git add file.docx
delete commits and unstage index
git reset
delete commits and unstage index and delete working tree
git reset --hard commit_name
delete commits
git reset --soft commit_name
unstage file
git rm --cached file_name
unstage folder
git rm -r --cached dir_name
commit index
git commit -m "message"
لوضع فاصلة زمنية commit مع رسالة لها و يتم حفظ الـ index إلى git. و إخلاء index
اكتب
git commit --amend -m " رسالة جديدة "
لحفظ التعديلات في commit الأخير مع تعديل الرسالة
اكتب
git commit --amend --no-edit
ل commit إلى commit الأخير
commit message Started with a type (Fix:, Feat:, Refactor:, Docs:) and Scope (Fix: Login form validation").
the first line is known as the subject line and its length is 50 characters and its case is Title Case (Capitalize the subject line) and its mood is the imperative mood
Separate the subject line from body with a blank line
blank line between the subject line and its length
Reference issues when relevant → fix: resolve #123
body: length of line is 72 characters
the body explains where and what and why instead of how
<type>[optional scope]: <description>
[optional body]
[optional footer]
feat(auth): add OAuth login support
Implemented OAuth authentication for third-party login providers.
* Types:
* feat: A new feature
* fix: A bug fix
* refactor: Code changes that don't affect functionality (Code restructuring (no behavior change))
* docs: Documentation changes
* style: Changes that don't affect the code's functionality (whitespace, formatting, etc.) (Code formatting (no logic changes))
* test: Adding missing tests or correcting existing tests
* chore: Changes to the build process or auxiliary tools and libraries (Maintenance tasks (e.g., updating dependencies))
* perf: Performance improvements
* Scope: Use scope in your commit message to indicate the area of the code affected.
Examples of Commit Message:
Fix: Bug in login form validation
/*
The login form was not properly validating email addresses. This commit fixes the validation logic to ensure that only valid email addresses are accepted.
*/
---
Tag for commit
git tag -a tage.name -m "message" commit_id
e.g. v2.0.0
تحصل على commit_id بـ كتابة git log
Semantic Versioning (SemVer)
SemVer is a standardized system for versioning software. It follows the format: `MAJOR.MINOR.PATCH`.
* MAJOR: Incremented when incompatible API changes are introduced.
* MINOR: Incremented when new functionality is added in a backwards-compatible way.
* PATCH: Incremented when backwards-compatible bug fixes are made.
Example:
* 1.0.0: Initial release.
* 1.1.0: New features are added (backwards-compatible).
* 1.1.1: Bugs are fixed (backwards-compatible) .
* 2.0.0: Major changes are introduced, potentially breaking existing code.
حذف
git tag -d tag_name
عرض الـtagـات
git tag --list
git tag -l
git tag -l --column
git tag -n
انتقال إلى commit المرفق بـ tag_name
git reset --hard tag_name
git level 2 in
https://oufok.com/article/view/6cd3c55209daaec086a55f1c44510a97/