̽ÌÖGitHubÎļþ¸Ä±ä·¾¶µÄÏà¹ØÎÊÌâ
github ÊÇÒ»¸ö¿ªÔ´µÄ´úÂëÍйÜƽ̨£¬È«Çò³ÌÐòÔ±ÃÇ¿ÉÒÔͨ¹ý github À´·ÖÏí×Ô¼ºµÄ¿ªÔ´ÏîÄ¿¡¢¼ÓÈëËûÈ˵ÄÏîÄ¿¡¢Ñ§Ï°¿ªÔ´ÊÖÒյȡ£ÔÚ github ÉÏ£¬Ã¿¸öÏîÄ¿¶¼ÓÐÒ»¸öΨһµÄ url£¬Óû§¿ÉÒÔͨ¹ý¸Ã url »ñÈ¡ÏîÄ¿´úÂëÒÔ¼°ÏîÄ¿µÄÏà¹ØÐÅÏ¢¡£¿ÉÊÇ£¬ÈôÊÇÎÒÃÇÐèÒªÐÞ¸ÄÏîÄ¿ÖеÄij¸öÎļþµÄ·¾¶£¬ÄǸÃÔõô°ìÄØ£¿ÏÂÃ棬ÎÒÃǾÍÀ´Ì½ÌÖһϠgithub Îļþ¸Ä±ä·¾¶µÄÏà¹ØÎÊÌâ¡£
Ò»¡¢ÎªÊ²Ã´Òª¸Ä±äÎļþ·¾¶
ͨ³£ÇéÐÎÏ£¬ÎÒÃÇÔÚÌá½»½ÓÂëµ½ GitHub ÉÏʱ£¬»áÖ»¹Ü°ü¹ÜÎļþ·¾¶µÄÒ»ÖÂÐÔ£¬ÕâÑù¼ÈÀû±ã´úÂëµÄÖÎÀí£¬Ò²±ãÓÚÆäËûÓû§²éÕÒÏà¹ØÎļþ¡£¿ÉÊÇ£¬ÓÐʱ¼äÎÒÃÇÒ²»áÓöµ½ÐèÒªÐÞ¸ÄÎļþ·¾¶µÄÇéÐΣ¬ºÃ±È£º
1.ÏîÄ¿Öع¹£ºµ±ÎÒÃǶÔÏîÄ¿¾ÙÐÐÖع¹Ê±£¬¿ÉÄÜÐèÒª½«Ò»Ð©ÎļþµÄÃû³Æ»ò·¾¶¾ÙÐÐÐ޸ģ¬ÒÔ˳ӦÏîÄ¿µÄнṹ¡£
2.ÎļþÖØÃüÃû£ºÓÐʱ¼äÎÒÃÇ¿ÉÄÜÐèÒªÐÞ¸Äij¸öÎļþµÄÃû³Æ£¬´ËʱÐèÒª½«Æä·¾¶Í¬²½¸üС£
3.ÎļþÒƶ¯£ºÓÐЩÎļþ¿ÉÄÜÐèÒªÒƵ½ÆäËûĿ¼»ò×ÓĿ¼Ï£¬´ËʱÐèÒªÐÞ¸ÄÆä·¾¶¡£
¶þ¡¢ÔõÑùÔÚ GitHub ÉϸıäÎļþ·¾¶
1.ÊÖ¶¯ÐÞ¸Ä
ÈôÊÇÎÒÃÇÖ»ÐèÒªÐ޸ĺÜÉÙÊýÄ¿µÄÎļþ£¬¿ÉÒÔͨ¹ýÊÖ¶¯ÐÞ¸ÄÀ´ÊµÏÖ¡£ÔÚ GitHub ÉÏÕÒµ½ÐèÒªÐ޸ĵÄÎļþ£¬Ñ¡ÖиÃÎļþ£¬µã»÷¸ÃÎļþÉÏ·½µÄ¡°Edit¡±°´Å¥£¬ÔÚеĽçÃæÖÐÐÞ¸ÄÎļþ·¾¶ºÍÎļþÃû£¬È»ºóµã»÷¡°Commit changes¡±¾ÙÐÐÌá½»¼´¿É¡£¿ÉÊÇ£¬ÈôÊÇÐèÒªÐ޸Ĵó×ÚµÄÎļþ£¬ÕâÖÖ·½·¨¾Í²»Ì«ÊʺÏÁË¡£
2.ʹÓà Git ÏÂÁî
Git ÊÇÒ»¸öºÜÊÇÇ¿Ê¢µÄ°æ±¾¿ØÖƹ¤¾ß£¬Ò²ÊÇ GitHub ʹÓõĺǫ́ÊÖÒÕ¡£ÈôÊÇÎÒÃÇÐèÒªÐ޸Ĵó×ÚµÄÎļþ·¾¶£¬ÍƼöʹÓà Git ÏÂÁîÀ´²Ù×÷¡£
Ê×ÏÈ£¬ÐèÒª½¨ÉèÒ»¸öеÄĿ¼£¬ÓÃÓÚ´æ·ÅÒÔÇ°µÄÎļþ£º
$ mkdir old_dir
µÇ¼ºó¸´ÖÆ
È»ºó£¬½«ÐèÒªÐ޸ķ¾¶µÄÎļþÒƶ¯µ½¸ÃĿ¼Ï£º
$ git mv file_name /path/to/old_dir/
µÇ¼ºó¸´ÖÆ
½Ó×Å£¬½«¸ÃĿ¼ËùÔÚµÄÎļþ¼ÐÌá½»µ½¿ÍÕ»ÖУº
$ git add /path/to/old_dir/ $ git commit -m "move file to old_dir"
µÇ¼ºó¸´ÖÆ
×îºó£¬ÔÚ¿ÍÕ»Öн¨Éèз¾¶£¬²¢½«¾É·¾¶ÏµÄÎļþ×ÊÔ´Á´½Óµ½Ð·¾¶£º
$ mkdir new_dir $ git mv /path/to/old_dir/* /path/to/new_dir/ $ git add /path/to/new_dir/ $ git commit -m "create new file path"
µÇ¼ºó¸´ÖÆ
ÕâÑù£¬ÎÒÃǾÍÀֳɵؽ«ËùÓÐÎļþµÄ·¾¶ÐÞ¸ÄÍê³ÉÁË¡£
Èý¡¢×¢ÖØÊÂÏî
ÔÚ¾ÙÐÐÎļþ·¾¶ÐÞ¸Äʱ£¬ÐèҪעÖØÒÔϼ¸µã£º
1.ÐÞ¸ÄÎļþ·¾¶ºó£¬ÐèÒªÖØвâÊÔ´úÂ룬ȷ±£ÏîÄ¿ÈÔÈ»Äܹ»Õý³£ÔËÐС£
2.ÐÞ¸ÄÎļþ·¾¶»á¸ü¸ÄÎļþµÄ URL£¬ÈôÊÇÆäËûÓû§ÒѾÒýÓÃÁ˾É·¾¶£¬ÐèÒª½«Æä֪ͨ²¢¸üÐÂÏìÓ¦´úÂë¡£
3.ÔÚ GitHub ÉÏÐÞ¸ÄÎļþ·¾¶¿ÉÄÜ»áÓ°Ïìµ½ÆäËû·ÖÖ§µÄ´úÂ룬ÐèÒªÉóÉ÷²Ù×÷£¬²¢ÊµÊ±¸üÐÂÏà¹Ø·ÖÖ§¡£
ËÄ¡¢×ܽá
ÔÚ GitHub ÉϾÙÐÐÎļþ·¾¶Ð޸IJ¢²»ÄÑ£¬Æ¾Ö¤ÎļþÊýÄ¿µÄ¼¸¶àÒÔ¼°×Ô¼ºµÄÊìÁ·Ë®Æ½¿ÉÒÔÑ¡ÔñÊÖ¶¯Ð޸ĻòʹÓà Git ÏÂÁî¡£¿ÉÊÇ£¬ÔÚ²Ù×÷Ç°ÐèҪ˼Á¿µ½¿ÉÄܵÄΣº¦£¬È·±£ÏîÄ¿µÄÎȹÌÐÔºÍÇå¾²ÐÔ¡£Ï£Íû±¾ÎÄÄÜ×ÊÖúµ½¸÷ÈËÔõÑùÔÚ GitHub ÉϸıäÎļþ·¾¶¡£
ÒÔÉϾÍÊÇ̽ÌÖGitHubÎļþ¸Ä±ä·¾¶µÄÏà¹ØÎÊÌâµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡