GithubÉÏÔõô½¨Éè´úÂë¿ÍÕ»²¢ÉÏ´«Ô´Âë
githubÒѾ³ÉΪ³ÌÐòÔ±×îÖ÷ÒªµÄÉç½»ÍøÂçÖ®Ò»£¬Îª¿ªÔ´ÏîÄ¿ÌṩÁËȫеĻúÔµÇ徲̨¡£ÔÚgithubÉÏ£¬Äã¿ÉÒÔʹÓÃ×Ô¼ºµÄÕË»§½¨Éè×Ô¼ºµÄ¿ªÔ´ÏîÄ¿£¬²¢ÓëÈ«ÇòµÄ¿ª·¢Õß¾ÙÐн»Á÷¡¢Ð×÷¡£ÔõÑùÉèÖÃgithubÉϵÄÔ´Â룿±¾ÎĽ«ÎªÄãÌṩÏêϸµÄ°ì·¨¡£
Ò»¡¢ÔÚGithubÉϽ¨Éè´úÂë¿ÍÕ»
Ê×ÏÈ£¬ÄãÐèÒªÔÚGithubÉϽ¨ÉèÒ»¸öеĴúÂë¿ÍÕ»¡£ÔÚGithubÊ×Ò³ÉÏ£¬µã»÷ÓÒÉϽǵġ°+¡±ºÅ£¬Ñ¡Ôñ¡°New repository¡±¡£
ÔÚ¡°Create a new repository¡±Ò³ÃæÉÏ£¬ÊäÈëÄãµÄ´úÂë¿ÍÕ»Ãû³Æ£¬²¢ÇÒÌí¼ÓһЩ˵Ã÷¡£Äã¿ÉÒÔÑ¡ÔñÊǽ«Õâ¸ö¿ÍÕ»ÉèΪPublic£¨¹ûÕ棩»òÕßPrivate£¨Ë½ÓУ©£¬È»ºóµã»÷¡°Create Repository¡±°´Å¥¡£
¶þ¡¢ÔÚGithubÉÏÌí¼ÓÔ´Âë
ÔÚ½¨ÉèºÃ´úÂë¿ÍÕ»ºó£¬ÄãÐèÒª½«´úÂëÉÏ´«µ½GithubÉÏ¡£Õâ¿ÉÒÔʹÓÃÁ½ÖÖ·½·¨Íê³É¡£
a. ʹÓÃGithub DesktopÉÏ´«Ô´Âë
Ê×ÏÈ£¬ÏÂÔØ×°ÖÃGithub Desktop¡£·¿ª³ÌÐò£¬µã»÷¡°Add¡±°´Å¥£¬Ñ¡ÔñÄãÍâµØµÄÔ´ÂëËùÔÚλÖã¬È»ºóµã»÷¡°Create Repository¡±¡£
½ÓÏÂÀ´£¬ÄãÐèÒªÊäÈëÄãÔÚGithubÉϽ¨ÉèµÄ¿ÍÕ»µÄÃû³ÆºÍÐÎòÐÅÏ¢£¬²¢ÇÒÑ¡ÔñÊÇ·ñÊÇPublic£¨¹ûÕ棩»òÕßPrivate£¨Ë½ÓУ©¡£È»ºó£¬µã»÷¡°Publish Repository¡±°´Å¥£¬Github Desktop»á½«ÄãµÄÔ´ÂëÉÏ´«µ½GithubÉÏ¡£
b. ʹÓÃÏÂÁîÐÐÉÏ´«Ô´Âë
ÈôÊÇÄã½ÏÁ¿ÊìϤÏÂÁîÐУ¬Äã¿ÉÒÔÖ±½ÓʹÓÃÏÂÁîÐн«Ô´ÂëÉÏ´«µ½GithubÉÏ¡£
²Î¿¼ÏÂÃæµÄ´úÂ룺
$ cd /path/to/your/local/repository $ git init $ git add . $ git commit -m "Initial commit" $ git remote add origin https://github.com/username/repo.git $ git push -u origin master
µÇ¼ºó¸´ÖÆ
ÆäÖУ¬/path/to/your/local/repositoryÊÇÄãÍâµØÔ´ÂëËùÔÚµÄÎļþ¼Ð·¾¶£¬https://github.com/username/repo.gitÊÇÄãÔÚGithubÉϽ¨ÉèµÄ¿ÍÕ»µØµã¡£
Èý¡¢ÉèÖôúÂë¿ÍÕ»
ÏÖÔÚÄãÒѾ½«´úÂëÉÏ´«µ½GithubÉÏÁË¡£½ÓÏÂÀ´µÄ°ì·¨ÊÇΪÄãµÄ´úÂë¿ÍÕ»×öһЩÉèÖá£
a. Ìí¼ÓREADMEÎĵµ
ΪÁËÈÃÆäËû¿ª·¢Õ߸üºÃµØÏàʶÄãµÄ¿ªÔ´ÏîÄ¿£¬ÄãÐèÒªÌí¼ÓÒ»¸öREADMEÎĵµ¡£Ð½¨Ò»¸öÃûΪREADME.mdµÄÎĵµ£¬²¢ÔÚÆäÖÐÌí¼ÓһЩ»ù±¾ÐÅÏ¢£¬ÀýÈçÄãµÄÏîÄ¿Ãû³Æ¡¢ÏÈÈÝ¡¢¹¦Ð§¡¢Ê¹ÓÃÒªÁìµÈ¡£
b. ÉèÖÃ.gitignoreÎļþ
ÄãÐèÒª½«ÄãµÄ´úÂë¿âÖв»ÐèÒª±»ÉÏ´«µÄÎļþÌí¼Óµ½.gitignoreÎļþÖС£ÀýÈ磬ÔÝʱÎļþ¡¢ÈÕÖ¾Îļþ¡¢»º´æÎļþµÈ¶¼¿ÉÒÔÔÚÕâÀïÉèÖúöÂÔ¡£
c. ÉèÖÃLICENSEÎļþ
ΪÁ˱£»¤ÄãµÄ´úÂë¸üºÃµÄʹÓã¬Äã¿ÉÒÔÉèÖÃÒ»¸ö¿ªÔ´ÐÒ飬ÒÔÊÚȨÆäËû¿ª·¢ÕßÔÚºÏÊʵÄÌõ¼þÏÂʹÓÃÄãµÄ´úÂ롣н¨Ò»¸öÃûΪLICENSEµÄÎļþ£¬²¢ÔÚÆäÖÐÑ¡ÔñÄãµÄÐÒéÀàÐÍ£¬ÀýÈçMIT¡¢GPL»òÕßApacheµÈ¡£
ËÄ¡¢·ÖÏíÄãµÄ´úÂë
ÏÖÔÚÄãÒѾΪÄãµÄ´úÂë¿â×öºÃÁËËùÓеÄÉèÖá£Äã¿ÉÒÔÔ¼ÇëÄãµÄÅóÙ¡¢Í¬Ê»òÕßÆäËû¸ÐÐËȤµÄÈËÒ»Æð¼ÓÈëÄãµÄÏîÄ¿£¬²¢·ÖÏíÄãµÄ´úÂë¿â¸øÆäËû¿ª·¢Õß¡£
ͨ¹ýGithubÉϵÄIssues¹¦Ð§£¬Äã¿ÉÒÔ½¨ÉèBug±¨¸æ»òÕßFeatureÇëÇóµÈ¡£Í¬Ê±£¬Äã¿ÉÒÔʹÓÃGithubµÄPull Request¹¦Ð§£¬´ÓÆäËû¿ª·¢ÕߵĴúÂë¿âÖкϲ¢´úÂëµ½×Ô¼ºµÄ´úÂë¿âÖС£
ÈôÊÇÄãµÄÏîÄ¿Ô½À´Ô½Ö÷Òª£¬Äã¿ÉÒÔ˼Á¿Ê¹ÓÃGithub Pages¹¦Ð§£¬ÎªÄãµÄÏîÄ¿½¨ÉèÒ»¸ö¾²Ì¬ÍøÕ¾¡£
×ܽá
GithubÌṩÁËÒ»¸öºÜºÃµÄ´úÂëÖÎÀíƽ̨£¬²¢ÇÒÓÐÐí¶àÇ¿Ê¢µÄÐ×÷¹¦Ð§£¬Ê¹µÃ´úÂëµÄ¿ª·¢±äµÃÔ½·¢¸ßЧºÍ¿ì½Ý¡£¹ØÓÚ³ÌÐòÔ±¶øÑÔ£¬ÕÆÎÕGithubµÄʹÓÃÒªÁìÊǺÜÊÇÖ÷ÒªµÄ¡£Ï£ÍûÕâƪÎÄÕ¿ÉÒÔ×ÊÖúÄã¸üºÃµØÃ÷È·ºÍʹÓÃGithubÉϵÄÔ´ÂëÉèÖá£
ÒÔÉϾÍÊÇGithubÉÏÔõô½¨Éè´úÂë¿ÍÕ»²¢ÉÏ´«Ô´ÂëµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡