الأمر git branch مع اسم الفرع:
git branch new-feature
هذا ينشئ الفرع فقط، وتبقى أنت في الفرع الحالي.
إنشاء والانتقال معًا
git switch -c new-feature
# or the older way
git checkout -b new-feature
أوامر مفيدة
git branch # list branches
git switch main # move to another branch
git branch -d old # delete a merged branch
لا توجد أوامر مثل git new branch أو git create branch.