简体   繁体   English

xCode build如何确定git分支?

[英]xCode build how to determine git branch?

Suppose i'm working on a regular xCode project that has git tracking the files. 假设我正在使用git跟踪文件的常规xCode项目。

For internal usage purposes, i'd like to know (by looking inside at the iOS app running on the iphone) certain debugging information, such as what git branch the developer was on. 出于内部使用目的,我想知道(通过在iPhone上运行的iOS应用内部查看)某些调试信息,例如开发人员所使用的git分支。

how could this be done? 怎么办呢?

on Android, you can modify the build script to look at the person's .git directory from where they've built and see something like refs/heads/feature_branch_2 inside the /.git/HEAD file. 在Android上,您可以修改构建脚本,以从该人的构建位置查看该人的.git目录,并在/.git/HEAD文件中看到refs/heads/feature_branch_2/.git/HEAD内容。

on xCode i have no idea what tool is even being used to build, let alone modify the build script. 在xCode上,我什至不知道什至正在使用什么工具来构建,更不用说修改构建脚本了。 or... do i have to modify the build script? 还是...我必须修改构建脚本吗? (ie is there an easier way?) (即有没有更简单的方法?)

You can manage it via source tree MAC application and change gitignore path for manage conflict. 您可以通过源树MAC应用程序对其进行管理,并更改gitignore路径以管理冲突。

You can change gitignore path - SourceTree->Preferences->Git->Global Ignore List->Edit File. 您可以更改gitignore路径-SourceTree-> Preferences-> Git-> Global Ignore List-> Edit File。

You can manage various commits and all the thing via its GUI. 您可以通过其GUI管理各种提交和所有操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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