×ðÁú¿­Ê±¹ÙÍøµÇ¼

gitÔõôÐÞ¸ÄoriginµØµã£¿Ê¾ÀýÏê½â

ÔÚʹÓà git ¾ÙÐÐЭ×÷¿ª·¢µÄÀú³ÌÖУ¬ÎÒÃǾ­³£ÐèÒªÐÞ¸ÄÔ¶³Ì¿ÍÕ»µÄµØµã¡£¹ØÓÚ git ¶øÑÔ£¬Ã¿Ò»¸öÔ¶³Ì¿ÍÕ»¶¼ÊÇÒ»¸ö git ЧÀÍÆ÷µÄµØµã£¬Õâ¸öµØµã±»³ÆΪ origin¡£Ò»Ñùƽ³£ÇéÐÎÏ£¬ÎÒÃÇÐèÒªÐÞ¸Ä origin µÄµØµãÀ´ÅþÁ¬²î±ðµÄ git ЧÀÍÆ÷»òÕß²î±ðµÄ·ÖÖ§¡£±¾ÎĽ«ÏÈÈÝÔõÑùÐÞ¸Ä git µÄ origin µØµã¡£

Ò»¡¢Éó²éÄ¿½ñµÄ origin

ÔÚ Git ÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁîÀ´Éó²éÄ¿½ñ origin µÄµØµã£º

git remote -v

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ÔËÐиÃÏÂÁîºó£¬»áÊä³ö Git Ô¶³Ì¿ÍÕ»µÄµØµãÁбí£¬Õâ¸öÁбí»áÏÔʾÿ¸öÔ¶³Ì¿ÍÕ»µÄÃû³ÆºÍµØµã£º

origin  https://github.com/username/repo.git (fetch)
origin  https://github.com/username/repo.git (push)

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ÔÚ¸ÃÁбíÖУ¬origin ÊÇ Git ĬÈϵÄÔ¶³Ì¿ÍÕ»Ãû³Æ£¬ºóÃæµÄµØµãÔòÊǸÿÍÕ»µÄ HTTPS URL¡£ÈôÊÇÄãÊÇʹÓà SSH ÅþÁ¬ Git ЧÀÍÆ÷£¬ÄÇôÊä³öµÄ½«ÊÇ SSH URL¡£

¶þ¡¢ÐÞ¸Ä origin

ÈôÊÇÎÒÃÇÐèÒªÐÞ¸Ä origin µÄµØµã£¬¿ÉÒÔͨ¹ýÒÔÏÂÏÂÁîÀ´ÊµÏÖ£º

git remote set-url origin <new-url></new-url>

µÇ¼ºó¸´ÖÆ

ÆäÖУ¬ ΪÐ嵀 Git ЧÀÍÆ÷µØµã¡£Í¨¹ý¸ÃÏÂÁGit ½«»áÐÞ¸Ä origin µÄµØµã£¬´Ó¶øÅþÁ¬µ½ÐµÄÔ¶³Ì¿ÍÕ»¡£

Èý¡¢Ê¾Àý

ΪÁËÈø÷È˸üºÃµØÃ÷È·ÐÞ¸Ä origin µÄÀú³Ì£¬ÏÂÃ潫¾ÙÒ»¸öÏÖʵµÄʾÀý¡£

¼ÙÉèÎÒÃÇÒª½«Ä¿½ñµÄÔ¶³Ì¿ÍÕ»ÅþÁ¬µ½ÁíÍâÒ»¸ö Git ЧÀÍÆ÷ÉÏ¡£Ê×ÏÈ£¬ÎÒÃÇÐèÒªÉó²éÄ¿½ñ origin µÄµØµã£º

git remote -v

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

Êä³ö£º

origin  https://github.com/username/repo.git (fetch)
origin  https://github.com/username/repo.git (push)

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

½ÓÏÂÀ´£¬Í¨¹ýÒÔÏÂÏÂÁԶ³Ì¿ÍÕ»ÅþÁ¬µ½Ð嵀 Git ЧÀÍÆ÷£º

git remote set-url origin https://gitlab.com/username/repo.git

µÇ¼ºó¸´ÖÆ

ÔËÐиÃÏÂÁîºó£¬Git ±ã»á½« origin µÄµØµãÐÞ¸ÄΪ https://gitlab.com/username/repo.git¡£ÈôÊÇÏëҪȷÈÏ origin ÊÇ·ñÒѾ­±»ÐÞ¸ÄÀֳɣ¬¿ÉÒÔÖØÐÂÔËÐÐ git remote -v ÏÂÁÊä³öÓ¦¸ÃΪ£º

origin  https://gitlab.com/username/repo.git (fetch)
origin  https://gitlab.com/username/repo.git (push)

µÇ¼ºó¸´ÖÆ

ËÄ¡¢½áÂÛ

ÐÞ¸Ä Git µÄ origin µØµãÊǾ­³£ÐèÒª¾ÙÐеIJÙ×÷Ö®Ò»£¬ÓÈÆäÊÇÔÚ¶àÈËЭ×÷¿ª·¢Ê±¡£Í¨¹ý±¾ÎÄËùÏÈÈݵÄÒªÁ죬ÎÒÃÇ¿ÉÒÔÀû±ãµØÐÞ¸Ä origin µÄµØµã£¬´Ó¶øÅþÁ¬µ½²î±ðµÄ Git ЧÀÍÆ÷»òÕß²î±ðµÄ·ÖÖ§¡£

ÒÔÉϾÍÊÇgitÔõôÐÞ¸ÄoriginµØµã£¿Ê¾ÀýÏê½âµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí£¬°æȨÕùÒéÓë±¾Õ¾Î޹أ¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È£¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ£¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢£¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢£¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎ壬9:30-18:30£¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ