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

ÔõÑùÔÚgithubÉϾÙÐÐpush²Ù×÷

ÔÚʹÓà git ¾ÙÐа汾¿ØÖƵÄÀú³ÌÖÐ £¬Ìá½»£¨commit£©ÊÇÒ»¸öºÜ³£¼ûµÄ²Ù×÷ £¬¿ÉÊÇÈôÊÇÖ»ÊÇÔÚÍâµØÌá½» £¬ÄÇô±ðÈËÊÇÎÞ·¨Éó²éÄãµÄ´úÂëµÄ¡£ÎªÁËÈñðÈËÄܹ»Éó²é²¢ÇÒ¶Ô´úÂë¾ÙÐÐÐÞ¸Ä £¬ÎÒÃÇÐèÒª½«´úÂë push µ½Ô¶³Ì¿ÍÕ»¡£github ÊÇÏÖÔÚ×îÊ¢ÐеĴúÂëÍйÜƽ̨֮һ £¬±¾ÆªÎÄÕ½«ÏÈÈÝÔõÑùÔÚ github ÉϾÙÐÐ push ²Ù×÷¡£

°ì·¨Ò»£º½¨Éè¿ÍÕ»

ÔÚ github Ö÷Ò³ÉÏÓÒÉÏ½ÇµÄ ¡°+¡± ±ê¼ÇÏÂÀ­²Ëµ¥ÖÐÑ¡Ôñ ¡°New repository¡± £¬½¨ÉèÒ»¸öеĿÍÕ» £¬²¢ÔÚ¿ÍÕ»Ãû³ÆÏ·½Ñ¡ÔñÊÇ·ñÐèÒª½¨Éè README ÎļþºÍ .gitignore Îļþ¡£

°ì·¨¶þ£ºÉèÖÃÔ¶³Ì¿ÍÕ»

ÔÚÖÕ¶ËÖÐÖ´ÐÐÒÔÏÂÏÂÁ

git remote add origin Ô¶³Ì¿ÍÕ»µØµã

ÕâÀï°ÑÔ¶³Ì¿ÍÕ»µÄµØµã¼ÇΪ Ô¶³Ì¿ÍÕ»µØµã £¬ÐèÒª½«ÆäÌ滻ΪÏÖʵµÄÔ¶³Ì¿ÍÕ»µØµã¡£

ʹÓà git remote -v ÏÂÁî¿ÉÒÔÉó²éÄ¿½ñ¿ÍÕ»µÄËùÓÐÔ¶³Ì¿ÍÕ»ÐÅÏ¢ £¬ÈçÏ£º

$ git remote -v
origin  git@github.com:username/repository.git (fetch)
origin  git@github.com:username/repository.git (push)

µÇ¼ºó¸´ÖÆ

ÈôÊÇÏÔʾµÄÐÅÏ¢ÓÐÎó £¬¿ÉÒÔʹÓà git remote rm origin ÏÂÁîɾ³ýÄ¿½ñ¿ÍÕ»µÄÔ¶³Ì¿ÍÕ»ÐÅÏ¢ £¬È»ºóÖØоÙÐÐÉèÖá£

°ì·¨Èý£ºÌí¼Ó²¢Ìá½»½ÓÂë

ÔÚÍâµØ¿ÍÕ»ÖÐÌí¼Ó´ýÌá½»µÄ´úÂëÎļþ£¨»òÎļþ¼Ð£©£º

git add filename »òÕß git add foldername

ÆäÖÐ £¬filename ºÍ foldername »®·ÖÖ¸´ú´ýÌá½»µÄµ¥¸öÎļþºÍÎļþ¼Ð¡£

Ö´ÐÐÍêÌí¼Ó²Ù×÷ºó £¬Ê¹Óà git status ÏÂÁî¿ÉÒÔÉó²éÄ¿½ñÍâµØ¿ÍÕ»µÄ״̬ £¬ÈçÏ£º

$ git status
On branch master

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
    new file:   filename</file>

µÇ¼ºó¸´ÖÆ

È»ºóÖ´ÐÐÌá½»²Ù×÷£º

git commit -m”commit message”

commit message Ö¸´úÌá½»µÄÐÅÏ¢ £¬¿ÉÒÔƾ֤ÏÖÕæÏàÐθü¸Ä¡£

°ì·¨ËÄ£ºÍÆËÍ´úÂë

ÔÚÍâµØ¿ÍÕ»ÖÐÌá½»Íê´úÂëºó £¬Ö´ÐÐÒÔÏÂÏÂÁ´úÂëÍÆË͵½Ô¶³Ì¿ÍÕ»£º

git push -u origin master

ÕâÀï £¬¡°-u¡±²ÎÊýÖ¸´ú¡°–set-upstream¡± £¬ÓÃÓÚ¹ØÁªÍâµØ¿ÍÕ»µÄÖ÷·ÖÖ§£¨branch£©ÓëÔ¶³Ì¿ÍÕ»µÄÖ÷·ÖÖ§ £¬²¢ÇÒµÚÒ»´ÎÍÆËÍÐèҪʹÓøòÎÊý¡£

ÈôÊDz»ÐèÒª¹ØÁªÖ÷·ÖÖ§ £¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁ

git push origin ·ÖÖ§Ãû

ÕâÀï £¬·ÖÖ§Ãû Ö¸´úÐèÒªÍÆË͵ķÖÖ§Ãû³Æ¡£ÆäÖÐ £¬¡°origin¡± ÊÇÖ¸Ô¶³Ì¿ÍÕ»µÄÃû³Æ £¬ÐèҪƾ֤ÏÖÕæÏàÐξÙÐиü¸Ä¡£

Ö´ÐÐÍêÍÆËͲÙ×÷ºó £¬¿ÉÒÔÔÚÔ¶³Ì¿ÍÕ»ÖÐÉó²éµ½ÍâµØ¿ÍÕ»ÖеĴúÂëÎļþ£¨»òÎļþ¼Ð£©¡£

×ܽá

ÒÔÉϾÍÊÇÔÚ github ÉϾÙÐÐ push ²Ù×÷µÄËùÓÐÁ÷³Ì¼°°ì·¨¡£×ܽáһϣº

½¨Éè github ¿ÍÕ»

ÉèÖÿÍÕ»µÄÔ¶³Ì¿ÍÕ»µØµã

ÔÚÍâµØ¿ÍÕ»ÖÐÌí¼Ó²¢Ìá½»½ÓÂë

Ö´ÐÐÍÆËͲÙ×÷ £¬½«´úÂëÍÆË͵½Ô¶³Ì¿ÍÕ»

¹ØÓÚ³õѧÕßÀ´Ëµ £¬ÕÆÎÕ git »ù±¾²Ù×÷ÊDZز»¿ÉÉÙµÄ £¬Ëü²»µ«Äܹ»×ÊÖúÎÒÃǸüºÃµØÖÎÀí´úÂë £¬»¹Äܹ»Ôö½øЭ×÷ºÍÍŶÓÏàÖú¡£Ï£ÍûÕâƪÎÄÕÂÄܹ»×ÊÖúÄã¸üºÃµØʹÓà github ƽ̨¡£

ÒÔÉϾÍÊÇÔõÑùÔÚgithubÉϾÙÐÐpush²Ù×÷µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

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

18523999891

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

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

QR code
ÍøÕ¾µØͼ