尊龙凯时人生就是博

gitÔõÑùºöÂÔÎļþ

ÔÚÏîÄ¿ÖУ¬ÎÒÃÇ¿ÉÄÜ»áÓöµ½Ò»Ð©²»ÐèÒª±» git ×·×ÙµÄÎļþ£¬ºÃ±È±àÒëÌìÉúµÄ¶þ½øÖÆÎļþ¡¢ÈÕÖ¾ÎļþÒÔ¼°ÔÝʱÎļþµÈ¡£´Ëʱ£¬git ÌṩÁËÒ»ÖÖºöÂÔÎļþµÄÒªÁ죬¿ÉÒÔºöÂÔÕâЩÎļþ£¬²î³ØÆä¾ÙÐа汾ÖÎÀí¡£

ÔÚ Git ÖУ¬ºöÂÔÎļþ½ÓÄɵÄÊÇ .gitignore Îļþ£¬¿ÉÒÔ¸æËß Git ºöÂÔÄÄЩÎļþ»òĿ¼²»±»×·×Ùµ½°æ±¾ÀúÊ·ÖС£ÔÚÕâƪÎÄÕÂÖУ¬ÎÒÃǽ«ÏÈÈÝ Git ÔõÑùºöÂÔÎļþ¡£

Ò»¡¢½¨Éè .gitignore Îļþ

½¨Éè .gitignore ÎļþºÜ¼òÆÓ£¬Ö»ÐèÒªÔÚÏîÄ¿¸ùĿ¼Öн¨ÉèÒ»¸öÃû×ÖΪ .gitignore µÄÎļþ¼´¿É¡£ÐèҪעÖصÄÊÇ£¬.gitignore ÎļþµÄÄÚÈݱØÐèƾ֤ Git µÄ¹æÔò¾ÙÐÐÉèÖá£ÏÂÃæÊÇÒ»¸ö .gitignore ÎļþµÄʾÀý£º

# ºöÂÔËùÓР.a Îļþ
*.a

# ¿ÉÊÇ lib.a Îļþ³ýÍâ
!lib.a

# ½ö½öºöÂÔÏîÄ¿¸ùĿ¼ÏµĠTODO Îļþ£¬²»°üÀ¨ subdir/TODO
/TODO

# ºöÂÔ build/ Ä¿Â¼ÏµÄËùÓÐÎļþ
build/

# ºöÂÔ doc/notes.txt Îļþ£¬µ«²»°üÀ¨ doc/server/arch.txt Îļþ
doc/*.txt

# ºöÂÔËùÓР.pdf ÎļþÔÚ doc/ Ä¿Â¼ÏÂÒÔ¼°×ÓĿ¼ÏÂ
doc/**/*.pdf

µÇ¼ºó¸´ÖÆ

ÔÚÉÏÊöʾÀýÖУ¬ÎÒÃÇ¿ÉÒÔ¿´µ½¶àÖÖÉèÖúöÂÔÎļþµÄ·½·¨¡£ÆäÖУ¬µÚÒ»ÐÐµÄ *.a ÌåÏÖºöÂÔËùÓÐµÄ .a Îļþ£¬!lib.a ÌåÏÖ²»ºöÂÔ lib.a Îļþ¡£/TODO ÌåÏÖºöÂÔÏîÄ¿¸ùĿ¼Ï嵀 TODO Îļþ£¬µ«²»°üÀ¨×ÓĿ¼Ï嵀 TODO Îļþ¡£build/ ÌåÏÖºöÂÔ build/ Ŀ¼ÏµÄËùÓÐÎļþ£¬doc/*.txt ÌåÏÖºöÂÔ doc/ Ŀ¼ÏµÄËùÓÐ .txt Îļþ£¬doc/**/*.pdf ÌåÏÖºöÂÔ doc/ Ŀ¼ÏÂÒÔ¼°×ÓĿ¼ÏµÄËùÓÐ .pdf Îļþ¡£ÔÚ .gitignore ÎļþÖУ¬ÎÒÃÇ»¹¿ÉÒÔʹÓà # ºÅÌåÏÖ×¢ÊÍ£¬ºÍ ! ºÅ×÷·ÏºöÂÔ¡£

¶þ¡¢ºöÂÔÒѾ­Ìá½»µÄÎļþ

ÔÚÏîÄ¿ÖУ¬ÓÐʱ¼äÎÒÃÇÐèÒª¶ÔijЩÎļþ¾ÙÐкöÂÔ£¬¿ÉÊÇÕâЩÎļþÒѾ­Ìá½»µ½ÁË Git ÖС£´Ëʱ£¬ÈôÊÇÎÒÃÇÐÞ¸ÄÁË .gitignore ÎļþÖеÄÄÚÈÝ£¬ÕâЩÎļþÈÔÈ»»á±»×·×Ùµ½°æ±¾ÀúÊ·ÖС£Òò´Ë£¬ÈôÊÇijЩÒѾ­Ìá½»µÄÎļþÐèÒªºöÂÔ£¬ÎÒÃÇÐèҪʹÓà git rm –cached ÏÂÁîÀ´´Ó Git ÖÐɾ³ýÕâЩÎļþµÄ¼Í¼¡£

ÀýÈ磬ÈôÊÇÎÒÃÇÐèÒªºöÂÔ README.md Îļþ£¬¿ÉÊÇÕâ¸öÎļþÒѾ­ÔÚ Git Öб»×·×Ùµ½ÁË°æ±¾ÀúÊ·ÖУ¬ÄÇôÎÒÃÇ¿ÉÒÔʹÓÃÈçÏÂÏÂÁ

git rm --cached README.md

µÇ¼ºó¸´ÖÆ

Ö´ÐÐÍêÕâ¸öÏÂÁîºó£¬README.md Îļþ²»»á±»´ÓÍâµØÎļþϵͳÖÐɾ³ý£¬Ö»ÊÇ´Ó Git µÄ°æ±¾¿âÖÐɾ³ý¡£´Ëʱ£¬ÎÒÃÇÔÙ½« README.md ÎļþÌí¼Óµ½ .gitignore ÖУ¬¾Í¿ÉÒÔÀֳɺöÂÔÕâ¸öÎļþÁË¡£

Èý¡¢ºöÂÔÎļþ¼Ð

ÔÚ Git ÖУ¬ÎÒÃDz»µ«¿ÉÒÔºöÂÔij¸öÎļþ£¬»¹¿ÉÒÔºöÂÔÒ»¸öÎļþ¼Ð¡£ÀýÈ磬ÈôÊÇÎÒÃÇÐèÒªºöÂÔ build/ Îļþ¼Ð£¬ÄÇôÎÒÃÇ¿ÉÒÔÔÚ .gitignore ÎļþÖÐÌí¼ÓÈçÏÂÄÚÈÝ£º

build/

µÇ¼ºó¸´ÖÆ

ÕâÑù£¬ËùÓÐ build/ Îļþ¼ÐÖеÄÎļþ¶¼»á±»ºöÂÔ£¬²»»á±» Git ×·×Ùµ½°æ±¾ÀúÊ·ÖС£

ËÄ¡¢×ܽá

ÔÚ¿ª·¢ÏîÄ¿ÖУ¬ºöÂÔÎļþÊÇÒ»¸ö³£¼ûµÄÐèÇó¡£Git ÌṩÁË .gitignore ÎļþÀ´×ÊÖúÎÒÃǺöÂÔ²»ÐèÒª±»×·×ÙµÄÎļþ¡£Í¨¹ý .gitignore Îļþ£¬ÎÒÃÇ¿ÉÒÔÉèÖúöÂÔÎļþµÄ¹æÔò£¬ºöÂÔijЩÎļþ»òÎļþ¼Ð£¬²î³ØÆä¾ÙÐа汾ÖÎÀí¡£ÈôÊÇÐèÒªºöÂÔÒѾ­Ìá½»µ½ Git ÖеÄÎļþ£¬ÎÒÃÇÐèҪʹÓà git rm –cached ÏÂÁîÀ´É¾³ýÕâЩÎļþµÄ¼Í¼¡£¹ØÓÚÏîÄ¿ÖеÄÎļþÖÎÀí£¬ºöÂÔÎļþµÄÉèÖÃÊǺÜÊÇÓÐÓõļ¼ÇÉ¡£

ÒÔÉϾÍÊÇgitÔõÑùºöÂÔÎļþµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

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

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

QR code
sitemap¡¢ÍøÕ¾µØͼ