[英]General Rules for commiting iOS xcode files to Github
I recently came across a situation where a colleague basically threw a fit when I committed about 12 *.h and 12 *.m and a bunch of images(assets) to github. 我最近遇到了这样一种情况,当我将大约12 * .h和12 * .m以及一堆图像(资产)提交给github时,一位同事基本上就适合了。 The 12 files included a few .xib files. 这12个文件包括一些.xib文件。 The total changes (including the images and xib xml code) came to around 985 changes. 总更改(包括图像和Xib xml代码)达到985个更改。 The 985 lines were mostly because the .xib files were getting converted to xml code. 985行主要是因为.xib文件已转换为xml代码。 The colleague said that the checkin was too huge. 同事说值机太大。 I am a little surprised to see this reaction as I didnot think 24 files comprised was a HUGE checkin, or is this truly against the rules for committing to github. 我对此反应感到有些惊讶,因为我不认为包含的24个文件是巨大的签入,或者这确实违反了提交github的规则。 I have used SVN most of my life and worked in large teams where I never came across this issue. 我一生中大部分时间都在使用SVN,并且曾在大型团队工作,但从未遇到过此问题。 I am working on a 2 person team and a recent user to git. 我正在2人团队和git的最近用户上工作。 Am wondering if I indeed need to change the way I commit? 想知道我是否真的需要更改提交方式? Any suggestions? 有什么建议么?
-Thanks -谢谢
I also read through the discussion, and what he is asking definitely looks like the exception, not the norm, especially for a small team of only two people. 我也阅读了整个讨论,他的要求肯定看起来像是例外,不是常态,特别是对于只有两个人的小团队而言。 There are indeed some rules to go by, but they are just common sense for good software engineering. 确实有一些规则需要遵循,但是对于良好的软件工程来说,它们只是常识。 I don't want to go outside the scope of your question, because if we start talking about all the various uses for different types of branches, we could talk for days. 我不想超出您的问题范围,因为如果我们开始谈论不同类型分支的所有各种用途,那么我们可能要讨论几天。
I would present an argument to your colleague by first discussing what you want to achieve by the commits, followed by an approach that can enable that to happen. 首先,通过讨论您想通过提交实现的目标,然后通过一种可以实现此目标的方法,向您的同事提出一个论点。 And it should be a dialog--who knows, if your discussing his objectives, you may find that it is beneficial to go his route. 而且应该是一个对话-谁知道,如果您讨论他的目标,您可能会发现走他的路线是有益的。 Hopefully, you will find a common ground that satisfies all of the most important objectives. 希望您会找到满足所有最重要目标的共同点。 When you come to an agreement, you should draw up some guidelines together, and make a copy for both. 达成协议时,您应该共同制定一些准则,并为两者制定一份副本。 It might seem easy to remember them at the time because they are logical, but at that same moment, you also might be making compromises that don't seem so logical weeks or months later. 由于它们是合乎逻辑的,因此在当时似乎容易记住它们,但与此同时,您可能还在做出折衷,而这些折衷在几周或几个月后似乎并不合逻辑。
Objectives 目标
Approach 途径
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.