شبكة تعلم مع ناو

ما وظيفة الأمر git branch؟

git branch يعرض الفروع أو ينشئها:

git branch               # list branches (* marks the current one)
git branch new-feature   # create a branch
git branch -d old-idea   # delete a merged branch
git branch -a            # include remote branches

إنشاء الفرع لا ينقلك إليه. للانتقال استخدم git switch new-feature، أو أنشئه وانتقل معًا بـ git switch -c new-feature.

لتأكيد التعديلات نستخدم git commit، وللمزامنة git pull وgit push.

اختبر نفسك

خمسة أسئلة سريعة، مع الإجابة والشرح بعد كل سؤال.