简体   繁体   中英

Modifying Git Diff files

We branched off the main project about 6 months ago. In that time the master branch has had 100,000 more lines of code added or deleted. We on the other hand have added or changed about 50,000 lines of code since. Its currently time to merge, so we've made a copy of branch A and merged changes from their branch B into it and called it branch C.

Now we want to take all the merge changes in our branch C and merge it back into our original branch A. But we want to safe guard against something horribly going wrong so we want to use the preproccesor to enable it or disable it depending on our product release of beta or release.

For example.

#if _BETA_CODE
.... their new code. (Merged)
#else
... our old code.
#endif

Does anyone know of a tool that can take the Diff of two projects (branch A, and the beta branch C) and merge them together but mark the changes with using #ifdef #else #endif commands?

diff有你需要的选项:-D NAME

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM