Umarni kan yadda ake sarrafa rassa A Git

Gudanar da rassa muhimmin al'amari ne na amfani da Git. Rassan suna ba ka damar yin aiki akan fasali da yawa, ayyuka, ko sigogin lambar tushe a lokaci guda. Anan akwai wasu mahimman dabaru da mahimman ayyuka don sarrafa rassa a Git:

 

Ƙirƙirar sabon reshe

Yi amfani da umarnin git branch <branch-name> don ƙirƙirar sabon reshe mai suna <branch-name>. Misali git branch feature-branch:.

Canjawa tsakanin rassan

Yi amfani da umarnin git checkout <branch-name> don canzawa tsakanin rassan. Misali git checkout feature-branch:.

Duba jerin rassan

Yi amfani da umarnin git branch don duba jerin rassan da ke cikin ma'ajiyar. Reshe na yanzu yana da alamar alama(*).

Haɗe rassan

Don haɗa canje-canje daga reshe ɗaya zuwa reshe na yanzu, yi amfani da umarnin git merge <branch-name>. Misali git merge feature-branch:.

Share reshe

Yi amfani da umarnin git branch -d <branch-name> don share reshe da ya gama aikinsa. Misali: git branch -d feature-branch

Tura reshe zuwa wurin ajiya mai nisa

Yi amfani da umarnin git push origin <branch-name> don tura takamammen reshe zuwa wurin ajiya mai nisa. Misali git push origin feature-branch:.

Ƙirƙirar reshe daga takamaiman alkawari

Yi amfani da umarnin git branch <branch-name> <commit-id> don ƙirƙirar sabon reshe daga takamaiman alkawari. Misali git branch bug-fix-branch abc123:.

 

Sarrafa rassa a cikin Git yana ba ku damar haɓaka fasali masu zaman kansu, yin gwaji, da sarrafa ingantaccen sigar lambar tushe. Yin amfani da umarni da dabaru na sama zasu taimaka muku kula da sarrafawa da tsara tsarin haɓaka software ɗin ku.