Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
172 views
in Technique[技术] by (71.8m points)

Mark a file in the GIT repo as temporarily ignored

We're migrating from Perforce to GIT. In perforce, there were some files that I'd want in the repository, but they shouldn't be checked in by individual developers regularly. Things like eclipse project files. Each dev might get the initial .project file, but then tweak it slightly for their environment.

With P4, I could take those files, put them in a separate changelist and forget about them. Syncing wouldn't overwrite them and they wouldn't get committed when I commited my default changelist.

Is there a way to do something similar with GIT?

I'd like to still be able to "git commit -a"

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You are probably looking for

git update-index --assume-unchanged .project


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...