git-flow finish release - selective merge

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 13:24:07
VonC

You can avoid the merge issue entirely by versionning a file "template", with a placeholder value in it:

DEV_MODE=@devmode@

You can then declare a content filter driver (in a .gitattributes file) in order to automatically generate the right content for that file on checkout, depending on the branch currently checked out.

(image shown in "Customizing Git - Git Attributes", from "Pro Git book")

The smudge script can use this to detect the current branch:

#!/bin/sh
branch=$(git rev-parse --symbolic --abbrev-ref HEAD)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!