尊龙凯时人生就是博

gitÔõÑùɾ³ýÎļþ¼Ð

gitÊÇÏÖ´ú¿ª·¢ÖÐ×îÊܽӴýµÄ°æ±¾¿ØÖƹ¤¾ßÖ®Ò»¡£ËüΪ´úÂëÖÎÀíºÍÍŶÓЭ×÷ÌṩÁËÐí¶à±ãµ±ºÍ¹¦Ð§ £¬Ê¹µÃ¿ª·¢ÕßÄܹ»ÇáËɵØÖÎÀíºÍÐÞ¶©´úÂ롣Ȼ¶ø £¬ÓÐʱ¼äÎÒÃÇÐèҪɾ³ýijЩÎļþ»òÎļþ¼Ð. ¶øɾ³ýÎļþ¼ÐÔÚ git Öв¢²»ÊÇÒ»¼þ¼òÆÓµÄÊÂÇé £¬ÐèҪʹÓÃһЩÌØÊâµÄÏÂÁî¡£

GitÖÐɾ³ýÎļþ¼ÐµÄÏÂÁî

Ҫɾ³ý git ÖеÄÎļþ¼Ð £¬¿ÉÒÔʹÓÃÈçÏÂÏÂÁ

git rm -r folder_name

µÇ¼ºó¸´ÖÆ

ÆäÖÐ £¬-rÑ¡ÏîÌåÏÖÒԵݹéµÄ·½·¨É¾³ýÎļþ¼Ð £¬folder_nameÌåÏÖҪɾ³ýµÄÎļþ¼ÐµÄÃû³Æ¡£Ö´ÐÐÕâ¸öÏÂÁîºó £¬ git ½«»á½«Îļþ¼Ð´ÓË÷ÒýÖÐɾ³ý £¬²¢½«Æä´ÓÊÂÇéĿ¼ÖÐɾ³ý¡£´Ëʱ £¬Ö´ÐÐgit statusÏÂÁî»áÏÔʾÎļþ¼ÐÒѱ»É¾³ý¡£

È»¶ø £¬É¾³ýÎļþ¼Ð²¢²»»á½«Æä´Ó git µÄÀúÊ·¼Í¼Öг¹µ×ɾ³ý¡£ÕâÒâζ×Å £¬ÈôÊÇÄãÔÚij¸öºóÐøµÄ°æ±¾ÖÐÐèÒª»Ö¸´¸ÃÎļþ¼Ð £¬Ò²ÊÇ¿ÉÒÔ×öµ½µÄ¡£

Òª³¹µ×ɾ³ýÎļþ¼Ð¼°ÆäËùÓÐÀúÊ·¼Í¼ £¬¿ÉÒÔʹÓÃÏÂÃæµÄÏÂÁ

git filter-branch --tree-filter 'rm -rf folder_name' HEAD

µÇ¼ºó¸´ÖÆ

ÆäÖÐ £¬–tree-filterÑ¡Ïî¸æËß Git ¶Ôÿ¸öÌá½»£¨ÔÚHEADµ½¸ùµÄ·¾¶ÉÏ£©Ö´ÐÐÒ»¸öÏÂÁÔÚ±¾ÀýÖÐÊÇɾ³ýÎļþ¼Ð£© £¬ rm -rf folder_nameÊÇÒ»¸öµÝ¹éɾ³ýÎļþ¼ÐµÄÏÂÁî¡£

×¢ÖØ£ºÊ¹ÓÃfilter-branchÕâ¸öÏÂÁî»áÐÞ¸Ä Git µÄÀúÊ·¼Í¼ £¬Òò´ËÇëÈ·±£ÈôÊÇÓÐÆäËûÈËÕýÔÚÓëÄã¹²Ïí¿ÍÕ» £¬ÔòÓ¦¸ÃЭÉ̺á£

½áÂÛ

ÔÚÐèҪɾ³ý git ÖеÄÎļþ¼Ðʱ £¬×îºÃʹÓà git rm -r folder_nameÏÂÁî £¬Õâ¿ÉÒÔÈà Git ´ÓË÷ÒýºÍÊÂÇéĿ¼ÖÐɾ³ý¸ÃÎļþ¼Ð¡£ÈôÊÇÐèÒª³¹µ×ɾ³ý¸ÃÎļþ¼Ð¼°ÆäÀúÊ·¼Í¼ £¬Ôò¿ÉÒÔʹÓÃgit filter-branchÏÂÁî¡£

¹ØÓÚ³õѧÕßÀ´Ëµ £¬Git ÊÇÒ»¸öºÜÊÇÓÐÓõŤ¾ß £¬Ëü¿ÉÒÔ´ó´óÌá¸ß¿ª·¢Ð§ÂÊ¡£¿ÉÊÇҲҪעÖØ Git µÄʹÓÃϸ½Ú £¬ÒÔÃⲻСÐÄÒýÆðÎó²Ù×÷¡£

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

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

Ïà¹ØÐÂÎÅ

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

18523999891

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

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

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