{"id":7584,"date":"2024-06-18T15:42:27","date_gmt":"2024-06-18T07:42:27","guid":{"rendered":"https:\/\/www.5x44.cn\/?p=7584"},"modified":"2024-06-18T15:44:40","modified_gmt":"2024-06-18T07:44:40","slug":"windows%e4%b8%8bgit%e4%b8%8a%e4%bc%a0%e8%87%aa%e5%8a%a8%e4%bf%ae%e6%94%b9%e6%8d%a2%e8%a1%8c%e7%ac%a6%e5%8f%b7","status":"publish","type":"post","link":"https:\/\/www.5x44.cn\/?p=7584","title":{"rendered":"windows\u4e0bgit\u4e0a\u4f20\u81ea\u52a8\u4fee\u6539\u6362\u884c\u7b26\u53f7"},"content":{"rendered":"\n<p>\u5728windows\u4e0b\u4f7f\u7528git\u6dfb\u52a0\u6587\u4ef6\u4f1a\u81ea\u52a8\u5c06linux\u6362\u884c\u7b26\u53f7\u8f6c\u6210windows\u6362\u884c\u7b26\u53f7\uff0c\u4f1a\u6709\u4ee5\u4e0b\u63d0\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>warning: in the working copy of 'ModifyFrontSysConfig_x86.sh', LF will be replaced by CRLF the next time Git touches it<\/code><\/pre>\n\n\n\n<p>\u4f46\u662f\u6211\u7684\u811a\u672c\u6765\u5c31\u662f\u8981\u5728linux\u4e0b\u8fd0\u884c\u7684\uff0c\u8fd9\u79cd\u8f6c\u6362\u4f1a\u4f7f\u811a\u672c\u5728linux\u4e0b\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c\uff0c\u4fee\u6b63\u65b9\u5f0f\uff1a<\/p>\n\n\n\n<p>1\u3001\u5173\u95edcore.autocrlf\u529f\u80fd\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git config --global core.autocrlf false<\/code><\/pre>\n\n\n\n<p>2\u3001\u8bbe\u7f6e\u6587\u4ef6\u7279\u5b9a\u7684\u5c5e\u6027\uff0c\u8bbe\u7f6e\u6587\u4ef6\u4e3atext\u5c5e\u6027\uff0c\u544a\u8bc9git\u4e0d\u8981\u66f4\u6539\u8fd9\u4e9b\u6587\u4ef6\u7684\u6362\u884c\u7b26\u53f7\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>git add --text ModifyFrontSysConfig_x86.sh<\/code><\/pre>\n\n\n\n<p>3\u3001\u4f7f\u7528.gitattributes\u6587\u4ef6\uff0c\u5728.gitattributes\u6587\u4ef6\u4e2d\u6dfb\u52a0\u89c4\u5219\uff0c\u6307\u5b9a\u67d0\u4e9b\u6587\u4ef6\u6216\u6a21\u5f0f\u5e94\u8be5\u4f7f\u7528LF\u6362\u884c\u7b26\u53f7\uff08UNIX\u6362\u884c\u7b26\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>*.sh text eol=lf<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5728windows\u4e0b\u4f7f\u7528git\u6dfb\u52a0\u6587\u4ef6\u4f1a\u81ea\u52a8\u5c06linux\u6362\u884c\u7b26\u53f7\u8f6c\u6210windows\u6362\u884c\u7b26\u53f7\uff0c\u4f1a\u6709\u4ee5\u4e0b\u63d0\u793a\uff1a \u4f46\u662f\u6211\u7684\u811a\u672c\u6765\u5c31\u662f\u8981\u5728linux\u4e0b\u8fd0\u884c\u7684\uff0c\u8fd9\u79cd\u8f6c\u6362\u4f1a\u4f7f&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/www.5x44.cn\/?p=7584\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-7584","post","type-post","status-publish","format-standard","hentry","category-it"],"_links":{"self":[{"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/posts\/7584","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7584"}],"version-history":[{"count":3,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/posts\/7584\/revisions"}],"predecessor-version":[{"id":7587,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=\/wp\/v2\/posts\/7584\/revisions\/7587"}],"wp:attachment":[{"href":"https:\/\/www.5x44.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.5x44.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}