开发者

git merge should ignore one directory

I have tons of data in directory called reports. While doing git merge with another branch I am getting lots of conf开发者_StackOverflow社区licts for files under reports directory. I would like git merge to ignore files under reports.

In another words I would like all the data from reports from master and not from lab branch.

Is that possible?

This is what I am doing right now.

git checkout master
git merge lab


If you need those files versioned, but keeping only the version on master branch, you need a merge driver: see here for a keepMine script.

Each time you will merge lab to master, all files within the report directory will keep their content (the one versioned on master).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜