Tool.Yun
أدوات مفيدة للمطورين
CSV إلى JSON
JSON Linter
JSON إلى .env
JSON إلى C#
JSON إلى CSV
JSON إلى Go
JSON إلى MessagePack
JSON إلى TOML
JSON إلى TS
JSON إلى XML
JSON إلى object
JSON إلى البيانات
JSON إلى كيان Java
Json Escaper/Unescaper
Json إلى PHP-Array
Json إلى Python
Json إلى SQL DDL
Json إلى مخطط
PHP-Array إلى JSON
tools.json-patch.name
أداة التحويل الى نص بتنسيق JSON
أداة ترتيب JSON
استعلام Json
تجميل وتنسيق JSON
تحويل Json إلى كود PHP
تحويل ObjGen إلى JSON
حزمة الرسائل إلى JSON
دمج JSON
محرر JSON
محلل حجم JSON
محول JS إلى JSON
محول JSON إلى JS
محول JSON إلى YAML
مصغر JSON
مقارنة JSON
مُختبر Jq/JSONPath
مُسطّح/غير مُسطّح JSON
TOML إلى JSON
تحويل TOML إلى YAML
تومل لينتر
دليل أوامر Tmux
دليل أوامر Zellij
دليل أوامر الشاشة
دليل مختصر لـ PowerShell
ملخص أوامر Git
ورقة الغش Jq
ورقة الغش Markdown
ورقة الغش Nginx
ورقة الغش Sed
ورقة الغش VIM
ورقة الغش الخاصة بـ Docker
ورقة الغش الخاصة بـ Docker SWARM
ورقة الغش الخاصة بـ Dockerfile
ورقة الغش الخاصة بـ Regex
ورقة الغش باش
ورقة الغش لـ Docker Compose
ورقة الغش لقواعد بناء جملة JSONPath
ورقة الغش نانو
ورقة غش Git Semantic Commit
ورقة غش K8s
ورقة غش تعبيرات عادية شائعة
ورقة غش لأمر chmod
ورقة غش لقواعد XPath
ورقة غش لمحددات CSS
XML Linter
XML إلى JSON
تحويل ObjGen إلى HTML
منسق XML
مُختبر XPath
مُختبر XSLT
أداة اختيار البطاقات
رمي النرد
عجلة الحظ
قاذفة العملة
tools.epc-qrcode-generator.name
فك رمز الاستجابة السريعة
قارئ الباركود
مولد الباركود
مولد رمز الاستجابة السريعة (QR Code)
مولد رمز الاستجابة السريعة (QR Code) للشبكة اللاسلكية
مولد رمز الاستجابة السريعة (QR Code) لمعلومات الاتصال
مُتحقق GTIN
أداة البحث عن رموز البلدان وفقًا لمعيار ISO 3166
إرشادات الإضاءة من IES
باحث ISO 639
بحث يونيكود
توافق ترخيص البرنامج
حاسبة اتفاقية مستوى الخدمة
حاسبة سرعة الجري
حاسبة مؤشر كتلة الجسم
شرح أوامر shell
قاموس إلكتروني
محقق أرقام ضريبة القيمة المضافة
محقق لوهن
محلل ومدقق رقم الحساب المصرفي الدولي (IBAN)
محلل ومنسق رقم الهاتف
محول الأحرف الكبيرة من RMB
محول التقويم
محول العملات
مدقق بطاقات الائتمان
مُحقق ومحلل ISBN
أي يوم؟
إنذار الوقت
إنذار كرون/أيام الأسبوع
العد التنازلي
حاسبة TTL
حاسبة الأيام
حاسبة التاريخ والمدة
حاسبة المدة
حاسبة وقت الوصول المتوقع (ETA)
دمج iCal
محلل ملفات ICAL
محول أرقام الأسبوع
محول المنطقة الزمنية
محول الوقت والتاريخ
مقياس الزمن
مولد ICAL
باسيتو/باسرك المحلية
باسيتو/باسرك عام/خاص
بايتات Niceware إلى عبارة مرور
بيكريبت
تجزئة النص
تشفير / فك تشفير النص
تشفير AGE
تشفير PGP
تشفير RSA
تشفير الملفات باستخدام PGP
تشفير سلسلة Jasypt
حاسبة CRC
فك تشفير Ansible Vault Crypt
محلل JWT
محلل SAML
محلل الشهادة/المفتاح
محول شهادة SSL
مشاركة أسرار شامير
مشفر/مفكك شفرة Bech32
مولد HMAC
مولد JWT
مولد المسؤولية الاجتماعية للشركات
مولد زوج المفاتيح Ed25519
مولد زوج مفاتيح ECDSA
مولد زوج مفاتيح RSA
مولد شهادة X509
مولد مفاتيح PGP
مُوقِّع ومُتحقق RSA/DSA/ECDSA
هاشر Argon2
هاشر الملفات
Json إلى Protobuf
Json إلى SQL INSERT
Stacktrace أجمل
أداة إخفاء جافا سكريبت
أداة إنشاء قواعد البيانات
أداة فك تشفير/فك حزم JavaScript
اختبار واجهة المستخدم Swagger
اختبارات API
تجميل وتنسيق SQL
تحويل Json إلى TypeScript
تمييز الأكواد/البرامج النصية
تنسيق وتصغير ملفات CSS/JS
جهاز اختبار الهروب ANSI
جهاز اختبار بيكوماتش
مؤقت بومودورو
محرر أوامر سطر الأوامر
محول الاقتباس
محول التجعيد
محول ملفات HEX
مزور البيانات
مقسم الملفات
منشئ سلسلة اتصال قاعدة البيانات
مولد Mailto
مولد أسرار جانجو
مولد الرموز المفضلة
مولد تجاهل Git
مولد جداول قواعد البيانات
مولد سمات Gita
مولد علامات Open Graph
مولد معلمات SQL
مولد نصوص اختبار التحميل K6
مُحسِّن جافا سكريبت
مُصغّر SQL
هارب الخيط
IPv4-6/IPRange/CIDR في IPRange/CIDR/IPMask
tools.restic-command-generator.name
tools.url-redirection-checker.name
أداة اختبار الميكروفون
أداة اختبار منافذ TCP/UDP
أداة تنزيل الروابط المتعددة
أرقام المنافذ
اختبار Websocket
استعلامات Cloudflare DNS/RDAP
استعلامات DNS
الأعداد الصحيحة إلى IPv4/IPv6
التحقق من عنوان MAC
بينغ
تحديد الموقع الجغرافي عبر IP
تفويض SIP
جهاز فك تشفير ARPA
حاسبة RAID
حاسبة ZPOOL RAID
حاسبة أمر Chmod
حاسبة استبعاد شبكات IP الفرعية
حاسبة الشبكات الفرعية المرئية
حاسبة الشبكات الفرعية لـ IPv4
حاسبة الشبكة الفرعية IPv6
حاسبة القرص الصلب
حاسبة معدل نقل البيانات
حاسبة موثوقية RAID
حاسبة نطاق IP من CIDR إلى IP الإصدار 4/6
حاسبة نطاق IPv4/6 إلى CIDR(s)
عنوان IP الخاص بي
فك تشفير X-VR-SpamCause
قائمة الشبكات الفرعية IPv4
قوة كلمة المرور Zxcvbn
محلل قوة كلمة المرور
محول Punycode
محول عناوين IPv4
محول عنوان IPv6
محول عنوان MAC
مدقق DNSBL
مدقق Whois
موسع نطاقات IPv4
مولد Apache LogRotate
مولد Crontab
مولد DKIM DNS
مولد DNS BIMI
مولد DNS DMARC
مولد FStab
مولد HTAccess
مولد Htpasswd/htaccess
مولد Iptables
مولد Rsync
مولد SPF DNS
مولد WPA PSK
مولد أوامر Curl
مولد أوامر UFW
مولد أوامر الإيقاف
مولد أوامر جدار الحماية
مولد الخيار 43
مولد تكوين Wireguard
مولد عناوين IPv6 ULA
مولد عناوين MAC
مولد مصادقة أساسية
مولد منفذ عشوائي
مولد نظام أسماء النطاقات PTR
مُحَوِّل أوامر الصدفة
مُنسِّق أوامر الصدفة
مُنسّق Nginx
ورقة الغش ZPool
يحتوي على مطهر
أداة تغيير حجم الصورة
إزالة EXIF
إزالة خلفية الصورة
التعرف الضوئي على الحروف للصور وملفات PDF
تحويل GIF إلى MP4
تحويل الصورة إلى SVG (potrace)
عاكس ألوان الصورة
علامة مائية
قارئ جودة الصور EXIF/Metadata/GPS/JPEG
قص الصورة
محول HEIC
محول ICO/PNG
محول صيغ الصور
مسجل الكاميرا
معاينة ملفات SVG
مقارنة الصور
أداة إنشاء أوامر Nmap
أداة اختبار HTTPS
أداة اختبار انتشار نظام أسماء النطاقات (DNS)
أداة اختبار نظام أسماء النطاقات (DNS)
باحث خصائص LDAP في ActiveDirectory
حاسبة المقاومة
دليل مختصر لتوصيل كابلات RJ45 Cat6
فك تشفير EMV TLV
فك تشفير Outlook Safelink
فك تشفير عنوان URL لمشاركة Sharepoint
فك تشفير معاملات ETH
قارئ ملفات الباركيه
قناع البيانات الحساسة
كاشف نوع الملف
كاشف/فك تشفير مجموعة أحرف النص
محلل MSG في Outlook
محلل البريد الإلكتروني
محلل البريد الإلكتروني المرتد
محلل تقارير DMARC
محلل عنوان URL
محلل ملفات تعريف الارتباط
محول GZip/Deflate
محول SMART Raw
محول أرقام الفاصلة العائمة (float number)
محول الطرف الأوسط
محول ترميز MIME
محول معرف كائن MongoDB
مختبر البكسلات الميتة
مستخرج هوية ندفة الثلج
مشفر/فك تشفير سداسي عشري
معلومات رموز المفاتيح
منشئ عناوين URL
مولد TCPDump
مُوسِّع عناوين URL القصيرة
وحدة التحكم بالمنفذ التسلسلي
键盘测试器
كمبيوتر اللياقة البدنية
محول الإضاءة
محول التردد
محول التسارع
محول السرعة
محول الطاقة
محول بادئات النظام الدولي للوحدات
محول درجات الحرارة
محول طاقة الطعام
محول معدل التدفق الحجمي
محول وحدات الحجم
محول وحدات الزاوية
محول وحدات الضغط
محول وحدات الطاقة
محول وحدات الطول
محول وحدات القوة
محول وحدات الكتلة
محول وحدات المساحة
حاسبة المسافة الجغرافية
حاسبة النسب المئوية
حاسبة نسبة العرض إلى الارتفاع
صانع مقاييس الأداء
Excel إلى البيانات
استهلاك الطاقة ونفقاتها في الكمبيوتر
تحويل CSV إلى بيانات
تحويل الملفات إلى Base64
تحويل نص إلى تمثيله الثنائي في UTF-8
تورنت إلى مغناطيس
محول أحرف Unicode إلى كيانات جافا
محول الأرقام الرومانية
محول الأنظمة العددية
محول الإحداثيات الجغرافية
محول الخصائص
محول الوحدات المتعددة
محول تنسيق متغيرات البيئة
محول ديسيبل ميلي واط
محول وحدة تخزين البيانات
مرمز Base64 للنصوص
مولد ULID
مُشفِّر/فك تشفير مصفوفة سداسية عشرية Base64
مُعَيِّر البريد الإلكتروني
نص إلى الترميز الموحد (Unicode)
محول UUID
مولد الأرقام العشوائية
مولد الاختصارات الرقمية (Numeronym)
مولد الرمز البريدي
مولد الرموز
مولد رمز كلمة مرور لمرة واحدة (OTP)
مولد عبارات مرور BIP39
مولد عبارة المرور
مولد كلمة المرور Diceware
مولد معرفات NanoIDs
مولد معرفات UUIDs
JSON إلى TOON
Unicode إلى GSM-7
أداة البحث عن الخطوط المكررة
أنا و ل تشيكر
إحصائيات النص
اختبار التعابير العادية
استخراج النص من HTML
الصورة إلى فن ASCII
انتقل إلى المسافات باستخدام زر Tab
تحويل TOON إلى JSON
تحويل النص إلى أسماء Unicode
تعتيم سلسلة نصية
حاسبة ليفينشتاين
حزم الملفات للذكاء الاصطناعي
قارئ تأكيد الحضور
كلمات مميزة
مترجم النصوص
محدد سطور عشوائية
محول الرونية
محول القوائم
محول تخطيط لوحة المفاتيح
محول حالة الأحرف
محول شفرة مورس
مخطط هيكل المجلد
مشاركة الروابط الاجتماعية
مصدر حورية البحر
مقارنة الخطوط
مقارنة القوائم
مقارنة النصوص
مقدر رمز GPT
مقسم مطالبات الذكاء الاصطناعي
منتقي الرموز التعبيرية
مولد أوامر Sed
مولد الاستشهادات
مولد نص فني ASCII
مولد نصوص Lorem ipsum
مولد/بانر زالغو
مُستبدل النص الذكي وقاطع الأسطر
مُشفِّر/فك تشفير رمز GPT
مُنسّق Unicode
نص إلى أبجدية الناتو
أنواع الوسائط (MIME types)
الصورة إلى CSS
تحويل HTML إلى XHTML
تحويل HTML إلى بيانات
ترميز/فك ترميز السلاسل النصية بصيغة ترميز عنوان URL
تهريب كيانات HTML (HTML Entities)
تهيئة سلسلة نصية كـ Slug
رموز حالة HTTP
صائد عناوين URL
صانع شظايا بحث نص URL
عجلة الألوان
محرر HTML مرئي
محلل وكيل المستخدم
محول CSS XPath
محول الألوان
محول بكسل REM
محول وحدات CSS
مدقق تباين الألوان
معلومات الجهاز
منظف HTML
منظف عناوين URL
مولد تدرج CSS
مولد صور SVG مؤقتة
مولد عنوان URL لـ UTM
مُجمِّل CSS
مُحسِّن HTML
مُصغّر HTML
HTML إلى Markdown
Markdown Lorem Ipsum
Markdown إلى DOCX
Markdown إلى HTML
Markdown إلى بيانات
tools.markdown-format-converter.name
تحويل Markdown إلى نص
تحويل ملفات epub إلى Markdown
لصق كعلامة Markdown
محرر Markdown
معاينة Markdown
مقارنة ماركداون
مولد جداول Markdown
مولد جدول المحتويات Markdown
مُحسِّن جدول Markdown
منشئ تعبيرات Cron
حاسبة الاستهلاك
التعرف الضوئي على الحروف في الرياضيات
حاسبة الإكراميات
حاسبة ثنائية
محلل رياضي
محول صيغ الرياضيات
مُصوِّر المنحنيات المثلثية/المعادلات
Docker Compose إلى Quadlets
Docker Compose إلى ملف .env
Docker compose إلى kubernetes
برنامج Traefik Docker Compose Maker
برنامج تنزيل صور Docker
تشغيل Docker إلى Kubernetes
تشغيل Docker إلى Quadlets
فحص Docker لتشغيل Docker
محول Docker Compose إلى Docker run
محول أوامر Docker run إلى Docker compose
محول تنسيق Docker Compose
ملصقات دوكر بانغولين
مولد التحكم في الوصول المستند إلى الأدوار (RBAC) في Kubernetes
مولد تسميات Dockerfile
مُحقق Docker Compose
تحويل HTML إلى PDF
تشفير PDF
تنسيق PDF Linearize/FastWeb
ضاغط PDF
فك تشفير وفتح ملفات PDF
مدقق تواقيع PDF
مستخرج صفحات PDF
مستخرج نصوص PDF
مُجمّع ملفات PDF
YAML إلى TOML
اندماج YAML
تجميل وتنسيق YAML
محول YAML إلى JSON
مُسطّح/غير مُسطّح YAML

ملخص أوامر Git

Git هو برمجية لا مركزية لإدارة الإصدارات. باستخدام هذا الملخص، سوف يكون لديك وصول سريع إلى أوامر git الأكثر شيوعًا.

Git is a distributed version control system: every clone is a full repository with its own history, branches and tags. This is a quick reference for the commands that come up daily — placeholders are written as <file>, <branch>, <commit> and <url>.

💡 Every command below has its own help (git rebase --help), and the destructive ones (clean, push, rm, mv) take -n / --dry-run to preview what would happen.

⚙️ Configuration

# identity used on every commit
git config --global user.name "<name>"
git config --global user.email "<email>"

# name of the branch created by git init
git config --global init.defaultBranch main

# editor for messages, rebases, ...
git config --global core.editor "code --wait"

# rebase instead of merging on pull
git config --global pull.rebase true

# plain 'git push' works on new branches
git config --global push.autoSetupRemote true

# every setting and the file it came from
git config --list --show-origin

# override for this repository only
git config --local user.email "<work-email>"

Handy aliases:

git config --global alias.st status

git config --global alias.co checkout

git config --global alias.lg "log --oneline --graph --decorate --all"

git config --global alias.last "log -1 --stat"

🚀 Get Started

# create a repository in the current directory
git init

# clone a remote repository
git clone <url>

# clone into a specific directory
git clone <url> <directory>

# clone and check out one branch
git clone --branch <branch> <url>

# shallow clone, latest commit only
git clone --depth 1 <url>

# clone including submodules
git clone --recurse-submodules <url>

# what is staged, changed, untracked
git status

# the same, in short format
git status -sb

➕ Staging

# stage a specific file
git add <file>

# stage everything under the current directory
git add .

# stage everything in the repository, deletions included
git add -A

# interactively stage individual hunks
git add -p <file>

# stage modifications and deletions, not new files
git add -u

# unstage, keep the changes in the working tree
git restore --staged <file>

# stop tracking a file, keep it on disk
git rm --cached <file>

# rename and stage in one step
git mv <old> <new>

# which .gitignore rule is hiding this file?
git check-ignore -v <file>

✅ Commit

# commit what is staged
git commit -m "<message>"

# stage tracked changes and commit
git commit -am "<message>"

# rewrite the last commit (message + content)
git commit --amend

# amend without changing the message
git commit --amend --no-edit

# fixup commit, squashed later by --autosquash
git commit --fixup <commit>

# add a Signed-off-by trailer
git commit -s -m "<message>"

# empty commit, e.g. to trigger CI
git commit --allow-empty -m "<message>"

⚠️ --amend rewrites history. Only amend commits that have not been pushed to a shared branch.

🌿 Branches

# list local branches
git branch

# local and remote-tracking branches
git branch -a

# last commit and upstream of each branch
git branch -vv

# switch to an existing branch
git switch <branch>

# create a branch and switch to it
git switch -c <branch>

# jump back to the previous branch
git switch -

# older equivalent of switch -c
git checkout -b <branch>

# branch off a specific commit or tag
git switch -c <branch> <commit>

# rename a branch
git branch -m <old> <new>

# delete a merged branch
git branch -d <branch>

# force-delete an unmerged branch
git branch -D <branch>

# branches already merged into HEAD (safe to delete)
git branch --merged

🔀 Merging & Rebasing

# merge a branch into the current one
git merge <branch>

# always create a merge commit
git merge --no-ff <branch>

# bring in the changes as one staged change set
git merge --squash <branch>

# bail out of a conflicted merge
git merge --abort

# replay the current branch on top of another
git rebase <branch>

# interactively squash, reword, drop, reorder commits
git rebase -i HEAD~5

# apply the --fixup commits automatically
git rebase -i --autosquash <base>

# resume after resolving conflicts
git rebase --continue

# drop the conflicting commit and continue
git rebase --skip

# return to the state before the rebase
git rebase --abort

# resolve conflicts with the configured merge tool
git mergetool

Resolving a conflict:

# 1. see which files conflict
git status

# 2. edit them and remove the <<<<<<< ======= >>>>>>> markers

# 3. mark each resolved file
git add <file>

# 4. resume (during a merge: git merge --continue)
git rebase --continue

⚠️ Rebasing rewrites commits. Never rebase a branch other people are already working on.

🌍 Remotes & Syncing

# list remotes and their URLs
git remote -v

# add a remote
git remote add origin <url>

# point a remote somewhere else
git remote set-url origin <url>

# rename a remote
git remote rename <old> <new>

# forget a remote
git remote remove <name>

# download objects and refs, change nothing
git fetch origin

# fetch everything, drop deleted remote branches
git fetch --all --prune

# fetch + merge (or rebase) the upstream branch
git pull

# replay local commits on top of the upstream
git pull --rebase

# push the current branch
git push

# push and set the upstream tracking branch
git push -u origin <branch>

# force-push, but refuse to clobber new commits
git push --force-with-lease

# delete a remote branch
git push origin --delete <branch>

# push all tags
git push origin --tags

⚠️ Prefer --force-with-lease over --force: it aborts if someone else pushed in the meantime.

📦 Stashing

# shelve tracked changes and clean the working tree
git stash

# include untracked files
git stash -u

# stash specific paths with a label
git stash push -m "<message>" <file>

# list every stash
git stash list

# show a stash as a patch
git stash show -p stash@{0}

# re-apply the newest stash and drop it
git stash pop

# re-apply a specific stash, keep it in the list
git stash apply stash@{2}

# create a branch from a stash and apply it
git stash branch <branch>

# delete one stash
git stash drop stash@{0}

# delete all stashes
git stash clear

🔍 Inspecting

# the whole history as a compact graph
git log --oneline --graph --decorate --all

# history of a file, with diffs
git log -p <file>

# history of a file, following renames
git log --follow <file>

# filter by date and author
git log --since="2 weeks ago" --author=<name>

# search commit messages
git log --grep="<pattern>"

# commits that added or removed a string
git log -S"<string>"

# commits in b that are not in a
git log <branch-a>..<branch-b>

# commit count per author
git shortlog -sn

# a single commit with its diff
git show <commit>

# working tree vs. index
git diff

# index vs. last commit
git diff --staged

# between two commits
git diff HEAD~1 HEAD

# changes since the branches diverged
git diff <branch-a>...<branch-b>

# summary of changed files
git diff --stat

# who last touched every line
git blame <file>

# blame a range of lines only
git blame -L 10,40 <file>

# search the tracked files
git grep "<pattern>"

# every position HEAD has had — your safety net
git reflog

🍒 Cherry-pick

# apply one commit onto the current branch
git cherry-pick <commit>

# apply a range of commits
git cherry-pick <commit-a>^..<commit-b>

# apply without committing
git cherry-pick -n <commit>

# after resolving conflicts
git cherry-pick --continue

# undo the whole cherry-pick
git cherry-pick --abort

🏷 Tags

# list tags
git tag

# list matching tags
git tag -l "v1.*"

# annotated tag on HEAD
git tag -a v1.0.0 -m "Release v1.0.0"

# tag an older commit
git tag -a v1.0.0 <commit>

# show a tag and its commit
git show v1.0.0

# push one tag
git push origin v1.0.0

# push all tags
git push origin --tags

# delete a local tag
git tag -d v1.0.0

# delete a remote tag
git push origin --delete v1.0.0

# closest tag to the current commit
git describe --tags

🧯 I’ve Made a Mistake

# fix the last commit message
git commit --amend

# undo the last commit, keep the changes unstaged
git reset HEAD~1

# undo the last n commits, keep the changes
git reset HEAD~<n>

# undo the last commit and throw the changes away
git reset --hard HEAD~1

# discard changes to one file
git restore <file>

# discard every uncommitted change
git restore .

# restore a file as it was at a commit
git restore --source=<commit> <file>

# undo a commit with a new commit (safe when shared)
git revert <commit>

# stage the revert without committing
git revert -n <commit>

# make the local branch match the remote (fetch first)
git reset --hard origin/<branch>

# find the lost commit...
git reflog

# bring a lost commit back on a new branch
git switch -c <branch> <commit>

git reset modes at a glance:

ModeMoves HEADIndex (staging)Working treeUse it to
--soft✅untoucheduntouchedRecommit differently, keep everything staged
--mixed✅resetuntouchedUnstage but keep the edits (default)
--hard✅resetresetThrow the changes away entirely ⚠️

💡 Nothing committed is really lost for ~90 days: git reflog lists every commit HEAD pointed at, even on deleted branches.

🧹 Cleaning

# dry run: what would be removed
git clean -n

# remove untracked files and directories
git clean -fd

# also remove ignored files (build output, node_modules)
git clean -fdx

# compress and tidy the object database
git gc

# drop unreachable objects
git prune

# check the repository for corruption
git fsck

🐛 Debugging

# begin a binary search for a bad commit
git bisect start

# a commit that is broken (often HEAD)
git bisect bad <commit>

# a commit that was fine
git bisect good <commit>

# let a test script decide automatically
git bisect run <command>

# end the search and return to the original HEAD
git bisect reset

# follow lines moved from other files
git blame -C <file>

🧩 Submodules & Worktrees

# add a submodule
git submodule add <url> <path>

# check out every submodule
git submodule update --init --recursive

# update submodules to their latest commit
git submodule update --remote

# commit each submodule sits on
git submodule status

# check out a second branch side by side
git worktree add ../<dir> <branch>

# list linked working trees
git worktree list

# remove one again
git worktree remove ../<dir>

🧠 Miscellaneous

# rename the local default branch
git branch -m master main

# graph of merge commits only
git log --graph --merges

# export a snapshot without .git
git archive -o release.zip HEAD

# contributions per author
git shortlog -sn --no-merges

# full SHA of the current commit
git rev-parse HEAD

# name of the current branch
git rev-parse --abbrev-ref HEAD

# repository size on disk
git count-objects -vH

# enable background repacking (Git 2.30+)
git maintenance start

Update a feature branch with the latest mainline:

git switch <branch>
git fetch origin <main-branch>
git rebase origin/<main-branch>   # or: git merge origin/<main-branch>

📚 Resources

  • Official documentation
  • Pro Git (free book)
  • Interactive branching tutorial
  • Dangit, Git!?! — recovering from the classic mistakes