¡¾ÕûÀí·ÖÏí¡¿Ò»Ð©³£ÓÃµÄ GitLab ÏÂÁî
gitlab ÏÂÁîÊÇÔÚ git ÖÐʹÓõģ¬ËüÊÇÒ»¸ö»ùÓÚ git ´úÂëÖÎÀíϵͳµÄ web Ó¦ÓóÌÐò£¬ÌṩԴ´úÂëÖÎÀí¡¢ÏîÄ¿Ð×÷¡¢Ò»Á¬¼¯³ÉºÍ°²Åŵȹ¦Ð§¡£ËüÊÇÒ»¸ö¹¦Ð§Ç¿Ê¢µÄ¹¤¾ß£¬¿ÉÒÔÓÃÀ´ÖÎÀí´óÐÍÍŶӵĴúÂë¿â¡£
GitLab µÄʹÓÃÒªÁìºÜ¼òÆÓ£¬¿ÉÒÔͨ¹ý Git ÏÂÁîÐлòÕß GitLab µÄͼÐλ¯½çÃæÀ´¾ÙÐвÙ×÷¡£ÒÔÏÂÊÇһЩ³£ÓÃµÄ GitLab ÏÂÁî:
git clone git@gitlab.com:your_username/your_project.git
Õâ¸öÏÂÁîÓÃÓÚ½«Ò»¸ö GitLab ÉϵÄÏîÄ¿¸´ÖƵ½ÍâµØÅÌËã»úÉÏ¡£ÆäÖÐ git@gitlab.com:your_username/your_project.git ÊÇÄãÏîÄ¿µÄµØµã¡£
git add .
Õâ¸öÏÂÁîÓÃÓÚ½«ÍâµØÐ޸ĵĴúÂëÌí¼Óµ½ GitLab µÄ°æ±¾¿âÖС£”.” µÄÒâ˼Êǽ«Ä¿½ñĿ¼ÏÂËùÓÐÐ޸ĵÄÎļþ¶¼Ìí¼Óµ½°æ±¾¿âÖС£
git commit -m “commit message”
Õâ¸öÏÂÁîÓÃÓÚ½«Ìí¼Óµ½ GitLab °æ±¾¿âÖеĴúÂëÌá½»£¬²¢ÇÒÌí¼Ó commit message ˵Ã÷±¾´ÎÌá½»×öÁËʲôÐ޸ġ£
git push origin master
Õâ¸öÏÂÁîÓÃÓÚ½«ÍâµØ´úÂë¿âÖеÄÐÞ¸Äͬ²½µ½ GitLab µÄЧÀÍÆ÷ÉÏ£¬ÆäÖÐ origin ÊÇÔ¶³Ì¿ÍÕ»µÄÃû³Æ£¬master ÊÇĬÈϵÄÖ÷·ÖÖ§¡£
git pull origin master
Õâ¸öÏÂÁîÓÃÓÚ½« GitLab ¿ÍÕ»ÖеĴúÂë¸üе½ÍâµØÅÌËã»úÉÏ£¬Í¬ÑùµÄ£¬ÆäÖÐ origin ÊÇÔ¶³Ì¿ÍÕ»µÄÃû³Æ£¬master ÊÇĬÈϵÄÖ÷·ÖÖ§¡£
git checkout -b new_branch_name
Õâ¸öÏÂÁîÓÃÓÚÔÚ GitLab ¿ÍÕ»Öн¨ÉèÒ»¸öеķÖÖ§²¢ÇÒÇл»µ½Õâ¸ö·ÖÖ§ÉÏ¡£new_branch_name ÊÇзÖÖ§µÄÃû³Æ¡£
git merge branch_name
Õâ¸öÏÂÁîÓÃÓÚ½«Ò»¸ö·ÖÖ§µÄÐ޸ĺϲ¢µ½Ä¿½ñ·ÖÖ§ÖС£branch_name ÊÇÒªºÏ²¢µÄ·ÖÖ§Ãû³Æ¡£
git reset –hard HEAD
Õâ¸öÏÂÁîÓÃÓڻعö±¾´ÎÌá½»£¬½«±¾´ÎÌá½»Ð޸ĵĴúÂ붼×÷·Ï¡£Õâ¸öÏÂÁîÐèÒªÉ÷Óã¬ÓÉÓÚËü»áÍêȫɾ³ýÉÏ´ÎÌá½»µÄÐ޸ġ£
ÕâЩÊdz£ÓÃµÄ GitLab ÏÂÁ¿ÉÒÔ×ÊÖú¿ª·¢Õ߸üºÃµØÖÎÀí´úÂë¿â¡£GitLab µÄʹÓÃÒªÁì½ÏÁ¿ÀàËÆÓÚ Github ºÍ Bitbucket£¬µ«ËüÌṩÁ˸üÇ¿Ê¢µÄ´úÂëÖÎÀíºÍÍŶÓÐ×÷¹¦Ð§£¬ÊÇÒ»¸öºÜÊÇÓÅÒìµÄ´úÂëÖÎÀí¹¤¾ß¡£
ÒÔÉϾÍÊÇ¡¾ÕûÀí·ÖÏí¡¿Ò»Ð©³£ÓÃµÄ GitLab ÏÂÁîµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡