Wayne posted @ Fri, 24 Dec 2010 13:19:25 +0000 in Experience , 14668 readers

开始使用git。对着在线文档读了几天,一边还试着用。今天要提交一份有.svn文件的工程到git里面,想把.svn给无视掉。我是用命令行方式操作的,一开始很自然地想到 是否可以在 git add XXX 后面跟个什么选项什么的把.svn给exclude掉,或者是否可以用正则 ,比如 src/*!(.svn/*) 这样的。结果发现正则是不行的,不论我用哪种shell的正则方式。查了下 git add的命令手册,也没发现有exclude的选项……于是接着搜索,看到相关讨论还不少,stackoverflow上面的确有点不错的料。仔细看了会大致上了解了,得到.git/info/exclude里面去写,或者在.gitignore里面写,或者在core.excludefile里面写。 那么写就写吧,于是切进exclude文件,直接加进了“*/.svn/*”,然后先git rm -r --cached src/ 然后git add src/, 然后git status







nick_name said:
Wed, 04 May 2011 02:27:43 +0000

你连 man gitignore 都没看懂。写个P文章啊。

Wayne said:
Sun, 08 May 2011 17:35:20 +0000



逸川 said:
Thu, 12 May 2011 09:09:32 +0000


National Animal Dise said:
Thu, 03 Nov 2022 08:30:28 +0000

India’s central government and other significant bodies such as the National informatics center. Open different beneficial schemes for the Indian citizens.To help improve the country’s economic and citizen livelihood. National Animal Disease Reporting System The schemes are directed to different sectors, such agricultural sector. The NADRS is among the top developed schemes by the central government. It operates under the department of animal husbandry, dairy and fisheries through the NIC.

civaget said:
Mon, 11 Dec 2023 18:58:05 +0000

Regular SEO audits are essential for identifying and addressing issues that might be holding you back in 구글 상위노출 rankings.

civaget said:
Tue, 12 Dec 2023 15:11:01 +0000

출장샵 therapists are experts at relieving muscle tension and promoting relaxation. Try it for yourself!

civaget said:
Sun, 17 Dec 2023 10:17:13 +0000

대구오피 is a hidden gem for relaxation enthusiasts. The quality of service here is exceptional, and the results are outstanding.

civaget said:
Thu, 21 Dec 2023 11:39:30 +0000

The 오피스타 team does an excellent job curating OP content.

civaget said:
Mon, 25 Dec 2023 14:08:19 +0000

Buffering? Not on 축구중계! Your soccer experience is lag-free.

civaget said:
Wed, 27 Dec 2023 19:55:57 +0000

일산휴게텔 goes above and beyond. Their variety of massages ensures there's something for everyone, making it the ultimate relaxation spot in the city.

civaget said:
Sat, 30 Dec 2023 10:24:27 +0000

Stream with ease on 누누티비. No ads and a vast collection of movies and dramas await.

civaget said:
Sat, 06 Jan 2024 12:22:43 +0000

제주오피, where each visit is a journey to complete relaxation, offering deep tissue massages, aromatherapy, and a serene atmosphere.

Login *

loading captcha image...
(type the code from the image)
or Ctrl+Enter