git --git-dir_我们与专家讨论了Git-成绩单

编程入门 行业动态 更新时间:2024-10-19 18:21:51

git --git-dir

Talk with the Experts this morning was an awesome experience for those that were lucky enough to be present. The guy with all the expertise was SitePoint forum Team Leader Thom Parkin, and he definitely knows his stuff. Rather than the usual flurry of questions and answers, Thom ran more of a mini-lecture style session, and even some of the more experienced among us learned something.

对于那些幸运地出席会议的人来说,今天早上与专家交谈是一次很棒的经历。 具有所有专业知识的人是SitePoint论坛团队负责人Thom Parkin,他当然知道他的知识。 Thom并没有像平常那样忙碌地回答问题,而是举办了一场小型讲座式的会议,甚至我们当中一些更有经验的人也学到了一些东西。

Unfortunately (and more than slightly ironically), a GitHub outage half way through the session meant that access to anyone trying to get in was denied – we rely on Gists to control access to the chatroom. Apologies to anyone that failed to join for that reason.

不幸的是(而且有点讽刺意味的是),在会话进行中途GitHub中断意味着对试图进入的任何人的访问都被拒绝了–我们依靠Gists来控制对聊天室的访问。 向因该原因未能加入的任何人表示歉意。

Some good resources came out of the talk, and I have listed those below for anyone that doesn’t want to filter through the entire transcript.

谈话中有一些不错的资源,下面列出了那些不想过滤整个笔录的人。

A Comprehensive Beginner’s Guide to GitMcCullough and Berglund on Mastering GitMcCullough and Berglund on Mastering Advanced GitLearn Git in 15 minutes Thom on Using Git with Dropbox How to commit changes to a new branch using Git

关于Git的全面初学者指南 McCullough和Berglund掌握Git McCullough和Berglund掌握Master Git在15分钟内学习Git Thom结合使用Git和Dropbox如何使用Git 将更改提交到新分支

If you want to see what we have lined up in the coming weeks, we have a schedule of upcoming sessions. If you missed today’s session because you didn’t know about it, you can sign up for email reminders of future sessions.

如果您想查看我们接下来几周的工作安排 ,我们将为您安排即将举行的会议的时间表 。 如果您由于不了解而错过了今天的会议,可以注册接收有关未来会议的电子邮件提醒 。

And for anyone that wants to see what went on this morning, here is the full transcript:

对于想了解今天上午发生的事情的人,这里是完整的成绩单

[21:53] <ParkinT> A grand WELCOME to all – especially those who are new.

[21:53] <ParkinT>向所有人,尤其是新来的人们致以盛大的欢迎。

[21:53] <ParkinT> I encourage you to join the Sitepoint forums, where we have an active exchange of ideas and tips on Web Development and all the associated disciplines

[21:53] <ParkinT>我鼓励您加入Sitepoint论坛,我们在该论坛上积极交流有关Web开发和所有相关学科的思想和技巧。

[21:54] <HAWK> Are any of you already using Git in the daily course of your work?

[21:54] <HAWK>你们每个人在日常工作中是否已经使用过Git?

[21:54] <scruggs> Whats the advantage of using git over something like subversion?

[21:54] <scruggs>与颠覆之类的东西相比,使用git有什么优势?

[21:54] <ParkinT> Great question, scruggs.

[21:54] <ParkinT>大问题,斯克鲁格。

[21:55] <ParkinT> The discussion about Source Control can often become a bit of a “Religious arguement”

[21:55] <ParkinT>关于源代码控制的讨论通常会变成“宗教争论”

[21:55] <ParkinT> There are many who have preferences and those are usually borne out of familiarity with one particular tool.

[21:55] <ParkinT>有许多人有偏好,而这些偏好通常是出于对一种特定工具的熟悉而产生的。

[21:56] <ParkinT> I have used many of the most common tools, including SVN.  As a matter of fact, in my “Day Job” I am forced to use SVN.

[21:56] <ParkinT>我使用了许多最常用的工具,包括SVN。 事实上,在“日间工作”中,我被迫使用SVN。

[21:56] <ParkinT> Git has a few distinct differences that *I* see as advantages.

[21:56] <ParkinT> Git有一些明显的区别,* I *认为是优点。

[21:56] <ParkinT> Primarily, it is LOCAL; meaning you do not need a centralized server.

[21:56] <ParkinT>主要是本地的; 这意味着您不需要集中式服务器。

[21:56] <Triopticon> From the short time I have tried Git, I have to say I just loving it! 

[21:56] <Triopticon>从我尝试Git的短时间开始,我不得不说我只是喜欢它!

[21:57] <ParkinT> The primary complaint about Git is the [often] obtuse commands and their syntax.

[21:57] <ParkinT>关于Git的主要抱怨是[经常]钝命令及其语法。

[21:57] <ParkinT> And I do not disagree with that!

[21:57] <ParkinT>我不同意!

[21:57] <ParkinT> Systems like Subversion *require* a centralized server and special consideration to remain synchronized with that server

[21:57] <ParkinT> Subversion之类的系统*需要*集中式服务器,并且需要特别注意与该服务器保持同步

[21:57] <ParkinT> Git is {more or less} stand-alone.

[21:57] <ParkinT> Git是{或多或少}独立的。

[21:58] <ParkinT> Now, that does not mean you cannot collaborate!!

[21:58] <ParkinT>现在,这并不意味着您不能合作!

[21:58] <ParkinT> And Github is the most popular site that represents a place to host Git repositories.

[21:58] <ParkinT> Github是最受欢迎的站点,代表托管Git存储库的地方。

[21:58] <ParkinT> I think the most common misperception (or misunderstanding) about Git is that Github and Git are one in the same.

[21:58] <ParkinT>我认为有关Git的最常见误解(或误解)是Github和Git是同一个人。

[21:59] <ParkinT> Bitbucket is another popular site that hosts Git repositories.  But you can host a centralized Git repo anywhere.

[21:59] <ParkinT> Bitbucket是另一个流行的网站,托管Git存储库。 但是您可以在任何地方托管集中式Git存储库。

[21:59] <HAWK> Yup, I hear that one a lot

[21:59] <HAWK>是的,我听到很多

[21:59] <Velochicdunord> How are they different?

[21:59] <Velochicdunord>它们有什么不同?

[21:59] <ParkinT> Years ago I created a video demonstrating how to host a Git repo on Dropbox; when Dropbox was new

[21:59] <ParkinT>几年前,我制作了一个视频,演示如何在Dropbox上托管Git存储库。 当Dropbox是新的

[21:59] <Triopticon> I like both Github and Bitbucket.

[21:59] <Triopticon>我同时喜欢Github和Bitbucket。

[22:00] <Velochicdunord> Any links to that video?

[22:00] <Velochicdunord>该视频有任何链接吗?

[22:00] <HAWK> Velochicdunord Github is a site that hosts Git repositories.

[22:00] <HAWK> Velochicdunord Github是一个托管Git存储库的站点。

[22:00] <ParkinT> To answer Velochicunord’s question (and continue my discussion)…

[22:00] <ParkinT>回答Velochicunord的问题(并继续我的讨论)…

[22:00] <ParkinT> Sorry.  I misunderstood the question.  Thanks, Hawk

[22:00] <ParkinT>对不起。 我误解了这个问题。 谢谢,霍克

[22:00] <ParkinT> Another thing about Git that differs from Subversion is that the entire history lives in the local repository.

[22:00] <ParkinT>关于Git的另一点与Subversion不同的是,整个历史记录都保存在本地存储库中。

[22:01] <ParkinT> You have ALL the commits (states of files) with you when working in Git.

[22:01] <ParkinT>在Git中工作时,您将拥有所有提交(文件状态)。

[22:02] <ParkinT> As a matter of fact, every collaborator on a project (in a Git repo) has the entire history.  So, by virtue of that, there are numerous redundant backup copies at all times

[22:02] <ParkinT>事实上,每个项目的协作者(在Git仓库中)都拥有整个历史。 因此,因此,始终有许多冗余备份副本

[22:02] <ParkinT> The way in which Git stores the information is also efficient and lightweight.

[22:02] <ParkinT> Git存储信息的方式也是高效且轻便的。

[22:02] <HAWK> Welcome to those of you that have just joined.

[22:02] <HAWK>欢迎大家加入。

[22:02] <HAWK> I’ll post a full transcript up on SitePoint later today

[22:02] <HAWK>我今天晚些时候将完整的成绩单发布到SitePoint上

[22:03] <HAWK> But you might find this document useful in the mean time http://s3.sitepoint/examples/git-project-changes.pdf

[22:03] <HAWK>但与此同时,您可能会发现此文档很有用http://s3.sitepoint/examples/git-project-changes.pdf

[22:03] <HAWK> Hi molona

[22:03] <HAWK>嗨莫罗纳

[22:03] <molona> Hi

[22:03] <molona>嗨

[22:03] <molona> don’t tell me that I came late?

[22:03] <molona>不要告诉我我来晚了吗?

[22:03] <ParkinT> Sorry, I started without you.

[22:03] <ParkinT>对不起,我没有你就开始了。

[22:03] <HAWK> we started a few mins early

[22:03] <HAWK>我们提早了几分钟

[22:03] <ParkinT> I AM JUST SO ENTHUSIASTIC ABOUT THIS TOPIC I CANNOT CONTAIN MYSELF!!

[22:03] <ParkinT>关于这个话题,我非常热情,我无法控制自己!

[22:04] <molona> Ok. For this time I will forgive you… for this time only :-p

[22:04] <molona>好的。 这一次我会原谅你……仅此一次:-p

[22:04] <Jerry> Say I start working on a project with some history and manual version control (either snapshots of a directory or a series of files with a version number appended to the file name). I’m starting development on a new version right now with a clean git repository. Is it possible to create a second repository to use as the master archive, building it

[22:04] <Jerry>说我开始研究具有一些历史记录和手动版本控制(目录的快照或一系列文件后带有版本号的文件)的项目。 我现在正在使用干净的git存储库开始在新版本上进行开发。 是否可以创建第二个存储库以用作主存档

[22:04] <Jerry> by hand using the available files, then eventually merge the current repository into the master?

[22:04] <Jerry>用手使用可用文件,然后最终将当前存储库合并到主数据库中?

[22:04] <ParkinT> Thank you

[22:04] <ParkinT>谢谢

[22:04] <HAWK> we’ve been talking about the advantages of Git over similar tools

[22:04] <HAWK>我们一直在谈论Git比类似工具的优势

[22:04] <HAWK> and the distinction between Git and Github

[22:04] <HAWK>以及Git和Github之间的区别

[22:04] <Jerry> A bit convoluted, but I don’t have time to create the master repository before starting the current work

[22:04] <Jerry>有点困惑,但是在开始当前工作之前我没有时间创建主存储库

[22:04] <JS> That is a very good beginning guide to Git. Thanks Hawk I read it today.

[22:04] <JS>这是Git很好的入门指南。 谢谢霍克,我今天读了它。

[22:04] <molona> That’s an important one… Thank you Hawk

[22:04] <molona>这是重要的一个……谢谢Hawk

[22:05] <ParkinT> “advantages” is a bit subjective.  But I have highlighted differences *I* consider advantages

[22:05] <ParkinT>“优点”有点主观。 但我强调了差异*我*考虑了优势

[22:05] <Carolyn> Oh, I thought there was a free Git class starting a few minutes ago. Am I lost?

[22:05] <Carolyn>哦,我认为几分钟前开始有免费的Git课程。 我迷路了吗?

[22:05] <ParkinT> The flexibility of Git means you can approach this problem in numerous ways.

[22:05] <ParkinT> Git的灵活性意味着您可以通过多种方式解决此问题。

[22:05] <scruggs> ParkinT: your conclusions have been insightful

[22:05] <scruggs> ParkinT:您的结论很有见地

[22:05] <ParkinT> If I was facing this, here’s how *I* would handle it.

[22:05] <ParkinT>如果我要面对这个问题,这是* I *处理它的方式。

[22:06] <ParkinT> Take the current, working files and get them in to a Git repo.  Keep the previous work (maybe on a DVD) as an archive.

[22:06] <ParkinT>获取当前的工作文件,并将其放入Git存储库中。 将以前的工作(也许在DVD上)保存为档案。

[22:06] <HAWK> Hi Carolyn – no, you’re in the right place. :) We’re chatting about Git now. Feel free to jump in with questions at any time. :)

[22:06] <HAWK>您好Carolyn –不,您来对地方了。 :)我们现在正在谈论Git。 随时随时提问。 :)

[22:06] <ParkinT> I would be willing to bet that, once the project is complete, it will look much LESS like those old files than it does now.

[22:06] <ParkinT>我愿意打赌,一旦项目完成,它看起来将比现在的旧文件少很多。

[22:06] <HAWK> I’ll post a full transcript up on SitePoint later today

[22:06] <HAWK>我今天晚些时候将完整的成绩单发布到SitePoint上

[22:06] <ParkinT> Moving forward be sure to commit your changes.

[22:06] <ParkinT>请继续进行更改。

[22:07] <Triopticon> What is the differences or advantages/disadvantages compared to Mercurial?

[22:07] <Triopticon>与Mercurial相比有什么区别或优点/缺点?

[22:07] <ParkinT> Another thing Git does VERY well, is it allows you to ‘experiment’ or test.

[22:07] <ParkinT> Git所做的另一件事非常好,它允许您进行“实验”或测试。

[22:07] <ParkinT> Using Git branches you can make dramatic changes without any FEAR you will lose your place (or need to backtrack).

[22:07] <ParkinT>使用Git分支,您可以进行重大更改,而无需担心,您会失去位置(或需要回溯)。

[22:07] <ParkinT> Mercurial and Git are *very* similar.

[22:07] <ParkinT> Mercurial和Git非常相似。

[22:08] <Carolyn> Ha. I have no idea what any of you are talking about, that’s why I wanted to take the class  to “learn Git”!

[22:08] <Carolyn>哈。 我不知道你们在说什么,这就是为什么我想上课“学习Git”!

[22:08] <ParkinT> I have very, very little experience with Mercurial.  If you pressed me I would say simply, “I can spell it!!”  LOL

[22:08] <ParkinT>我对Mercurial的经验很少。 如果您按下我,我会简单地说:“我会拼写!!” 大声笑

[22:08] <HAWK> Carolyn – you might find this document helpful http://s3.sitepoint/examples/git-project-changes.pdf

[22:08] <HAWK> Carolyn –您可能会发现此文档很有帮助http://s3.sitepoint/examples/git-project-changes.pdf

[22:08] <Carolyn> Thanks, I’ll go there. 

[22:08] <Carolyn>谢谢,我去那里。

[22:08] <HAWK> Hang around if you have time. We welcome any questions at all – even very basic ones. :)

[22:08] <HAWK>如果有时间,请闲逛。 我们完全欢迎任何问题,甚至是非常基本的问题。 :)

[22:09] <ParkinT> The document HAWK has referenced is a great INTRODUCTION to git

[22:09] <ParkinT> HAWK引用的文档对于git来说是一个很好的介绍

[22:09] <ParkinT> If you are unfamiliar with the concept of Source Control.  Or you are not a developer but wondering about how this tool can help you.

[22:09] <ParkinT>如果您不熟悉源代码管理的概念。 或者您不是开发人员,但想知道此工具如何为您提供帮助。

[22:09] <Triopticon> ParkinT – Now worries… :D

[22:09] <Triopticon> ParkinT –现在担心…:D

[22:09] <ParkinT> It was carefully crafted to be a safe, guided tutorial.  Just enough to get your feet wet.

[22:09] <ParkinT>它是经过精心设计的安全教程。 刚够弄湿你的脚。

[22:10] <molona> So ParkinT, have you used any other source control software before using GIT? and if so, why made you change?

[22:10] <molona>那么,ParkinT,在使用GIT之前,您是否还使用了其他任何源代码控制软件? 如果是这样,为什么要进行更改?

[22:10] <ParkinT> I have used SourceSafe (don’t get me started!!) and, as I mentioned early, my “day job” forces me to use Subversion.

[22:10] <ParkinT>我使用了SourceSafe(不要让我开始!!),并且正如我前面提到的,我的“日常工作”迫使我使用Subversion。

[22:11] <molona> I have to say that it is a great tool for those that use Linux, it is a bit hard when you’re used to Windows :D

[22:11] <molona>我不得不说,对于那些使用Linux的人来说,它是一个很棒的工具,当您习惯Windows时,它有点困难:D

[22:11] <Carolyn> I am a writer and need to learn more than one CMS, and Git is often mentioned right in the beginning. Sooo, obviously I need to learn it and know nothing about it. :)

[22:11] <Carolyn>我是一名作家,需要学习多个CMS,一开始经常提到Git。 太棒了,显然我需要学习它,对此一无所知。 :)

[22:11] <ParkinT> The switch to Git was not easy for me.  It required a little adjustment in my perspective. 

[22:11] <ParkinT>切换到Git对我来说并不容易。 在我看来,这需要一点调整。

[22:11] <Jerry> Thanks Parkin. Actually, we do reference the old files quite a bit for support purposes because many of the users of the product remain on older versions Two repositories is certainly better than where we are now, but it would be nice if I could ultimately merge them

[22:11] <杰里>谢谢帕金。 实际上,出于支持目的,我们确实引用了很多旧文件,因为该产品的许多用户仍然使用旧版本。两个存储库肯定比我们现在的存储库好,但是如果我最终可以将它们合并,那就太好了

[22:11] <ParkinT> But, I must say, a) reading the ProGit book and b) learning more about the internal workings of Git gave me a profound appreciation for it.

[22:11] <ParkinT>但是,我必须说,a)阅读ProGit书,b)了解有关Git内部工作的更多信息,这使我对此深表赞赏。

[22:11] <molona> Carolyn, GIT is not a CMS. It is a version control software

[22:11] <molona> Carolyn,GIT不是CMS。 它是一个版本控制软件

[22:12] <ParkinT> Ah, Jerry, I that was not clear to me.  I see your dilema.

[22:12] <ParkinT>啊,杰里,我不清楚。 我看到你的困境。

[22:12] <HAWK> I used SourceSafe at my last job ParkinT, so I hear you on that!

[22:12] <HAWK>我在上一份工作ParkinT中使用了SourceSafe,所以我听到了!

[22:12] <ParkinT> I have been evangelizing the use of Git by “all walks of life”.

[22:12] <ParkinT>我一直在通过“各行各业”宣传Git的使用。

[22:12] <molona> Do you use GIT now, Hawk?

[22:12] <molona>霍克,您现在使用GIT吗?

[22:13] <Carolyn> I realize that GIT is not a CMS. But when I start looking at EE or Chart, etc. etc. they immediately mention Git. So, I need to learn about it. 

[22:13] <Carolyn>我意识到GIT不是CMS。 但是,当我开始查看EE或Chart等时,他们立即提到Git。 所以,我需要了解它。

[22:13] <ParkinT> One part of my “day job” involves technical training where I need to develop curricula.  Mostly these are MSWord documents.

[22:13] <ParkinT>我的“日常工作”的一部分涉及需要开发课程的技术培训。 这些大多是MSWord文档。

[22:13] <ParkinT> I use Git to help me track (and retrace) my work.

[22:13] <ParkinT>我使用Git来帮助我跟踪(和追溯)我的工作。

[22:13] <molona> Carolyn, Ok, Apologies. Just misunderstood what you said :D

[22:13] <molona>卡罗琳,好的,抱歉。 只是误解了你说的话:D

[22:13] <HAWK> I don’t do much coding these days Molona! I use GitHub, but only for the Gist functionality

[22:13] <HAWK>最近,我对Molona的编码工作不多! 我使用GitHub,但仅用于Gist功能

[22:13] <ParkinT> Carolyn makes an interesting point.

[22:13] <ParkinT>卡罗琳提出了一个有趣的观点。

[22:14] <Triopticon> I would also recommend this two video sit-downs at O’Reilly: “McCullough and Berglund on Mastering Git” and “McCullough and Berglund on Mastering Advanced Git”!

[22:14] <Triopticon>我还建议在O'Reilly进行两个视频静坐:“ McCullough和Berglund使用Mastering Git”和“ McCullough和Berglund使用Mastering Advanced Git”!

[22:14] <ParkinT> Git is (probably) the most popular VCS in Open Source world

[22:14] <ParkinT> Git(可能)是开源世界中最受欢迎的VCS

[22:14] <HAWK> I should jump in and say that if anyone has any good resources, feel free to link to them

[22:14] <HAWK>我应该跳进去说,如果有人有任何好的资源,请随时链接到他们

[22:14] <ParkinT> You will find yourself pointed to Git repositories (many on Github) quite often for software to download/install/use

[22:14] <ParkinT>您会发现自己经常指向Git存储库(许多在Github上),供软件下载/安装/使用

[22:14] <HAWK> I’ll add them to the transcript when I post it later on

[22:14] <HAWK>我稍后将其发布到成绩单时,会将其添加到成绩单中

[22:15] <ParkinT> Thanks Triopticon.  Great resources.

[22:15] <ParkinT>感谢Triopticon。 巨大的资源。

[22:15] <ParkinT> Code School also has a “Try Git” course (I think it has its own domain ‘trygit’).

[22:15] <ParkinT>代码学校还开设了“尝试Git”课程(我认为它拥有自己的域名“ trygit”)。

[22:15] <molona> When I installed GIT, it automatically connected to GitHub… but am I force to use GitHub? What if I want to use some other repository?

[22:15] <molona>当我安装GIT时,它会自动连接到GitHub…但是我被迫使用GitHub吗? 如果我想使用其他存储库怎么办?

[22:15] <ParkinT> But its intended audience is software developers

[22:15] <ParkinT>但其目标受众是软件开发人员

[22:16] <James> it’s http://try.github.io/

[22:16] <James>是http://try.github.io/

[22:16] <ParkinT> There are numerous places to host a Git repository.

[22:16] <ParkinT>有很多地方可以托管Git存储库。

[22:16] <ParkinT> Here is a video I created many years ago http://www.youtube/watch?v=2bxbzFQEMYM  that demonstrates using Dropbox for your Git repository

[22:16] <ParkinT>这是我多年前创建的视频http://www.youtube/watch?v=2bxbzFQEMYM ,演示了如何在您的Git存储库中使用Dropbox

[22:17] <Triopticon> Nice!

[22:17] <Triopticon>太好了!

[22:17] <ParkinT> Github simply is the most popular.

[22:17] <ParkinT> Github最受欢迎。

[22:17] <molona> Cool, you’re my hero now ParkinT

[22:17] <molona>酷,你现在是我的英雄ParkinT

[22:17] <ParkinT> Bitbucket is another I know that supports Git.

[22:17] <ParkinT> Bitbucket是我所知道的另一个支持Git的对象。

[22:17] * Hardy slaps Hardy around a bit with a large trout

[22:17] * Hardy用大鳟鱼将Hardy拍了一下

[22:17] <Velochicdunord> Thanks!

[22:17] <Velochicdunord>谢谢!

[22:18] <HAWK> Ah, the old trout, eh Hardy?

[22:18] <HAWK>啊,老鳟鱼,哈迪?

[22:18] <ParkinT> ANother of the things Git does differently but I think is a great advantage

[22:18] <ParkinT> Git所做的其他事情有所不同,但我认为这是一个很大的优势

[22:18] <Hardy> Hehe – just wanted to see how much damage I’d do ;)

[22:18] <哈迪>呵呵–只是想看看我会受到多大的伤害;)

[22:18] <ParkinT> is the way it handles [what it calls] patches.  In this way you can email the Delta of a repository in a packaged form that Git understands

[22:18] <ParkinT>是它处理[调用]补丁的方式。 这样,您可以通过Git理解的打包形式通过电子邮件发送存储库的Delta

[22:19] <ParkinT> Hardy, you will have a bruise tomorrow!

[22:19] <ParkinT>哈代,明天你会瘀伤!

[22:19] <Triopticon> I would say that Github is more geared against the social aspect and open source environment even if you can pay for private repos as well.

[22:19] <Triopticon>我想说Github更适合于社交方面和开放源代码环境,即使您也可以为私人仓库支付费用。

[22:19] <scruggs> “Delta of a respository”, what does that mean?

[22:19] <scruggs>“存储库的增量”是什么意思?

[22:19] <molona> I didn’t know that dropbox could work with GIT…nice!

[22:19] <molona>我不知道保管箱可以与GIT配合使用……很好!

[22:19] <ParkinT> True.  Git bills itself at “Facebook for developers”

[22:19] <ParkinT>是的。 Git在“面向开发人员的Facebook”上收费

[22:19] <James> Any recommended tutorials that are noob friendly?

[22:19] <James>有没有推荐的入门教程?

[22:19] <jerrac> http://gitlab/ is good if you have the resources to host it yourself.

[22:19] <jerrac> http://gitlab/很好,如果您有资源自己托管。

[22:20] <ParkinT> What I mean by ‘delta’ is the difference between one and another.

[22:20] <ParkinT>“ delta”是指彼此之间的差异。

[22:20] <scruggs> Ok, thanks for clarifying.

[22:20] <scruggs>好,谢谢您的澄清。

[22:20] <ParkinT> Github, by the way, is open source.  With a web host you can create your own version of what is at Github

[22:20] 顺便说一句,<ParkinT> Github是开源的。 通过网络托管,您可以在Github上创建自己的版本

[22:21] <ParkinT> The way Git conceptualizes the commit (and the history tree) it lends itself to branching far better than others like SVN

[22:21] <ParkinT> Git将提交(和历史树)概念化的方式使其分支比SVN等其他分支更好

[22:21] <jerrac> Github is open source? I’ve never seen any place to download their source code.

[22:21] <jerrac> Github是开源的吗? 我从未见过任何下载其源代码的地方。

[22:21] <ParkinT> I can be working on a project; let’s pretend it is a website.

[22:21] <ParkinT>我可以从事一个项目。 让我们假装这是一个网站。

[22:22] <ParkinT> I get an idea that I want to try some fancy AJAX stuff.  But I am afraid to mess up what already “works”.

[22:22] <ParkinT>我有一个想法,我想尝试一些精美的AJAX东西。 但是我恐怕要弄乱已经“起作用”的东西。

[22:22] <ParkinT> I simply create a branch in git.  This gives me a new place to go FROM MY CURRENT STATE

[22:22] <ParkinT>我只是在git中创建一个分支。 这给了我一个新的去处

[22:22] <ParkinT> After experimenting, if I don’t like the results I can simply restore (checkout) the master 

[22:22] <ParkinT>经过实验,如果我不喜欢结果,我可以简单地还原(签出)母版

[22:23] <ParkinT> If I have made an amazing improvement I can merge my branch with the master.

[22:23] <ParkinT>如果我做了一个令人惊奇的改进,我可以将我的分支与主分支合并。

[22:23] <ParkinT> Now, here’s the cool part.

[22:23] <ParkinT>现在,这是最酷的部分。

[22:23] <molona> Does merging mean that you will delete that branch forever?

[22:23] <molona>合并是否意味着您将永远删除该分支?

[22:23] <ParkinT> I have a new set of code.  But, at anytime, I can go RIGHT BACK TO THAT PREVIOUS STATE just with a checkout.

[22:23] <ParkinT>我有一组新的代码。 但是,在任何时候,我都可以通过结帐立即回到以前的状态。

[22:24] <ParkinT> No.  The branch is not deleted.  You can explicitly delete a branch.

[22:24] <ParkinT>否。未删除分支。 您可以显式删除分支。

[22:24] <ParkinT> But Git works really hard to not let you shoot yourself in the foot.

[22:24] <ParkinT>但是,Git的工作非常辛苦,它不让您用脚射击。

[22:24] <lj> How do I download from a ghithub pages BRANCH. Is it possible? I only get the master files.

[22:24] <lj>如何从ghithub页面下载BRANCH。 可能吗? 我只得到主文件。

[22:24] <ParkinT> YOu cannot delete a branch if it does not have any history behind it.

[22:24] <ParkinT>如果分支没有任何历史记录,则无法删除。

[22:24] <molona> Don’t worry. I’ll still manage to shoot myself in the foot :p

[22:24] <molona>不用担心。 我仍然设法朝自己的脚射击:p

[22:24] <ParkinT> On Github, there is a dropdown that shows you all the branches.

[22:24] <ParkinT>在Github上,有一个下拉列表显示所有分支。

[22:25] <ParkinT> Many repositories only have one (master) branch.

[22:25] <ParkinT>许多存储库只有一个(主)分支。

[22:25] <lj> I know but when I try to download with all the files from a githhub pages branch, I do not get all the files on that branch.

[22:25] <lj>我知道,但是当我尝试从githhub页面分支中下载所有文件时,我没有在该分支上获得所有文件。

[22:25] <ParkinT> Like I said before, one of the unique things about Git is that the repository contains the entire history.  So, if there are branches, they will be included when you fetch the repo.

[22:25] <ParkinT>就像我之前说的,关于Git的独特之处之一是存储库包含整个历史记录。 因此,如果有分支,则在获取存储库时会将它们包括在内。

[22:26] <ParkinT> Github has added a lot of web-based, GUI stuff to allow you to view the contents of a repository.  In order to get the entire Git repository you need to use Git (traditionally on the command line).

[22:26] <ParkinT> Github添加了许多基于Web的GUI内容,使您可以查看存储库的内容。 为了获得整个Git存储库,您需要使用Git(传统上在命令行上)。

[22:26] <lj> I can clone onto my own github, but I cannot download the branch “github pages” files to my machine to work on.

[22:26] <lj>我可以克隆到自己的github上,但是无法将分支“ github页面”文件下载到我的机器上进行操作。

[22:26] <ParkinT> I suspect you are just copying files from the website.

[22:26] <ParkinT>我怀疑您只是从网站复制文件。

[22:26] <ParkinT> Ah Github pages is not part of Git.

[22:26] <ParkinT> Ah Github页面不属于Git。

[22:27] <ParkinT> It is a ‘feature’ of Github.  Like Fork and Star

[22:27] <ParkinT>这是Github的“功能”。 像叉子和星星

[22:27] <lj> yes I was trying to zip these files..

[22:27] <lj>是,我正在尝试压缩这些文件。

[22:27] <ParkinT> The group at Github are amazing innovators.

[22:27] <ParkinT> Github的团队是惊人的创新者。

[22:27] <James> Should I edit the code first then create a branch? or Create the branch / checkout and add new codes? so that the changes will not appear in the master branch?

[22:27] <James>我应该先编辑代码然后创建分支吗? 还是创建分支/结帐并添加新代码? 这样更改将不会出现在master分支中?

[22:27] * Codebold slaps Codebold around a bit with a large trout

[22:27] * Codebold用大鳟鱼拍打一下Codebold

[22:27] <ParkinT> Great question, James.

[22:27] <ParkinT>詹姆斯,很好的问题。

[22:28] <ParkinT> Whenever you issue the ‘commit’ command, all the files (that have been marked to be tracked by Git) are captured as part of that commit.

[22:28] <ParkinT>每当您发出“ commit”命令时,所有文件(已标记为由Git跟踪)都被捕获为该提交的一部分。

[22:28] <ParkinT> The current STATE of all those files is captured and the commit – as a whole – is assigned a Globally unique identifier.

[22:28] <ParkinT>捕获所有这些文件的当前状态,并总体上为提交分配一个全局唯一标识符。

[22:28] <ParkinT> If you then create a branch, it will – at that moment – contain all the same files.

[22:28] <ParkinT>如果您随后创建一个分支,则该分支此时将包含所有相同的文件。

[22:29] <ParkinT> You should then hack on those files and, when you make another commit it will be in that branch.

[22:29] <ParkinT>然后,您应该破解这些文件,并且在再次提交该文件时,该文件将位于该分支中。

[22:29] <ParkinT> You now have, essentially, two different versions of the files to reference.

[22:29] <ParkinT>现在,您现在基本上具有两个不同版本的文件供参考。

[22:29] <ParkinT> Think of the trunk of a mighty OAK as the master Git repository.

[22:29] <ParkinT>将强大的OAK的主干视为Git主存储库。

[22:29] <ParkinT> Each time you make a branch, it is a limb that comes out of that growing tree at some definite point in time.

[22:29] <ParkinT>每次创建分支时,它都是在某个确定的时间点从那棵正在生长的树中出来的树枝。

[22:30] <ParkinT> The main part of the tree continues to grow, independently.

[22:30] <ParkinT>树的主要部分继续独立生长。

[22:30] <ParkinT> The master branch can continue to grow (change). And it will if you are working on a collaborative project.

[22:30] <ParkinT>主分支可以继续增长(更改)。 如果您正在合作的项目中,它也会。

[22:30] <ParkinT> Because OTHERS are hacking on THEIR copy of the repository.

[22:30] <ParkinT>因为其他人正在入侵他们的存储库副本。

[22:30] <Jerry> If I am on the master, edit some files, then decide I need to put the changes on a branch, how do I do that?

[22:30] <Jerry>如果我在主服务器上,请编辑一些文件,然后确定我需要将更改放在一个分支上,该怎么做?

[22:31] <ParkinT> Unlike other systems, the synchronization process (merge) is performed on each individual computer (copy of the repo).

[22:31] <ParkinT>与其他系统不同,同步过程(合并)在每台单独的计算机(存储库的副本)上执行。

[22:31] <ParkinT> There is a Git command to do that, Jerry

[22:31] <ParkinT>有一个Git命令可以做到这一点,杰里

[22:32] <scruggs> I think the best approach would be to always checkout the files you need, make changes, and them commit those changes. The commit/change history information is valuable when trying to figure out where something in the master repo changed

[22:32] <scruggs>我认为最好的方法是始终签出所需的文件,进行更改,然后提交这些更改。 提交/更改历史记录信息在尝试确定主存储库中的某些内容发生更改时非常有用

[22:32] <HAWK> FYI guys, due to a GitHub outage, if you leave this chatroom (by refreshing your page) you won’t be able to get back in.

[22:32] <HAWK>仅供参考,由于GitHub中断,如果您离开此聊天室(通过刷新页面),将无法重新进入。

[22:32] <ParkinT> That’s exactly right, scruggs.

[22:32] <ParkinT>没错,斯克鲁格斯。

[22:32] <HAWK> I hope they’ll sort it out soon! I rely on Gists to control access.

[22:32] <HAWK>我希望他们能尽快解决! 我依靠Gists来控制访问。

[22:32] <ParkinT> There is another of my ‘favorite’ commands in Git.  “BLAME”

[22:32] <ParkinT> Git中还有另一个我最喜欢的命令。 “怪”

[22:33] <HAWK> Oh the irony

[22:33] <HAWK>哦,讽刺的是

[22:33] <molona> lol Hawk

[22:33] <molona>哈哈·霍克

[22:33] <ParkinT> You can reference a commit (or a file in a commit) and find out who/when that change occured

[22:33] <ParkinT>您可以引用提交(或提交中的文件)并找出更改的对象/时间

[22:33] <ParkinT> Gist is another innovation of the smart people at Github!

[22:33] <ParkinT> Gist是Github聪明人的另一项创新!

[22:33] <ParkinT> I love Gitst

[22:33] <ParkinT>我爱吉斯特

[22:33] <lj> is it possible to pull in one directory of a repo into local with a terminal command? Like you said, “checkout the files you need”

[22:33] <lj>是否可以使用终端命令将回购的一个目录拉入本地? 就像您说的那样,“签出您需要的文件”

[22:34] <ParkinT> *even when I cannot spell it correctly!

[22:34] <ParkinT> *即使我不能正确拼写它!

[22:34] <ParkinT> Yes, lj

[22:34] <ParkinT>是的,我

[22:34] <Jerry> <– waiting with bated breath for the name of the command…  :)

[22:34] <Jerry> <–屏住呼吸等待命令的名称……:)

[22:34] <ParkinT> You can `checkout` any portion of a commit by naming the file(s) you want

[22:34] <ParkinT>您可以通过命名所需文件来“检出”提交的任何部分

[22:34] <lj> yes, panting

[22:34] <lj>是的,喘着粗气

[22:35] <ParkinT> Sorry Jerry.  Just checkout with -b for a new branch

[22:35] <ParkinT>对不起,杰里。 只需使用-b签出一个新分支

[22:35] <scruggs> Can the git admin control that somewhat?

[22:35] <scruggs> git admin可以控制吗?

[22:35] <ParkinT> Then add if necessary and commit

[22:35] <ParkinT>然后根据需要添加并提交

[22:35] <ParkinT> http://stackoverflow/questions/14655816/how-to-commit-changes-to-new-branch

[22:35] <ParkinT> http://stackoverflow/questions/14655816/how-to-commit-changes-to-new-branch

[22:35] <ParkinT> The Git admin is YOU. 

[22:35] <ParkinT> Git管理员是您。

[22:35] <ParkinT> The repository is on your machine and you control the horizontal, you control the vertical…

[22:35] <ParkinT>存储库在您的计算机上,您可以控制水平,而可以控制垂直…

[22:35] <Jerry> Won’t checkout -b complain if there are uncommitted changes?

[22:35] <Jerry>是否会结帐-b抱怨是否有未提交的更改?

[22:36] <ParkinT> Like I said before, git was designed with “human beings” in mind.

[22:36] <ParkinT>就像我之前说的,git的设计考虑了“人类”。

[22:36] <ParkinT> It helps you avoid making dumb mistakes and hating yourself.

[22:36] <ParkinT>它可以帮助您避免犯下愚蠢的错误和讨厌自己。

[22:36] <Triopticon> :p

[22:36] <Triopticon>:p

[22:36] <ParkinT> But it *is* possible to do anything

[22:36] <ParkinT>但是*有可能做任何事情

[22:36] <scruggs> I guess what I mean…is lets say you have multiple repos…like dev, test, and production. Could the git admin setup security rules to prevent lower developers from committing things to lets say the production repo?

[22:36] <scruggs>我想我的意思是……可以说您有多个存储库,例如开发,测试和生产。 git admin可以设置安全规则来防止较低级的开发人员将事情提交给生产仓库吗?

[22:36] <ParkinT> Many commands include a -f (it means ‘force’) switch.

[22:36] <ParkinT>许多命令包括-f(表示“强制”)开关。

[22:37] <lj> OK so $git checkout sass this would actually download the sass folder onto my local machine? Sorry I’m not too experienced with this.

[22:37] <lj>好,所以$ git checkout sass会把sass文件夹实际下载到我的本地计算机上吗? 对不起,我对此不太了解。

[22:37] <ParkinT> It does not make sense to setup different repositories for the same project. 

[22:37] <ParkinT>为同一项目设置不同的存储库是没有意义的。

[22:37] <ParkinT> YOu want to encourage collaboration.  With Git in place NO ONE PERSON can cause the system to die with a bad piece of code.

[22:37] <ParkinT>您想鼓励合作。 使用Git时,没有人会导致系统死于错误的代码段。

[22:37] <HAWK> Yay – we’re open again!

[22:37] <HAWK>是的-我们再次开放!

[22:37] <ParkinT> Because a) you can go back in history and b) every collaborator has a copy of the entire repo on his/her desk.

[22:37] <ParkinT>因为a)您可以追溯到历史,并且b)每个协作者在他/她的桌子上都有整个回购的副本。

[22:38] <Triopticon> I love this branching model: http://nvie/posts/a-successful-git-branching-model/

[22:38] <Triopticon>我喜欢这个分支模型: http : //nvie/posts/a-successful-git-branching-model/

[22:38] <lj> Im confused when you say 

[22:38] <lj>我说的话很困惑

[22:38] <ParkinT> $git checkout sass would rewrite (overwrite if necessary) all the files that are part of the most recent git commit on the branch named sass

[22:38] <ParkinT> $ git checkout sass将重写(如有必要,覆盖所有文件)属于sass分支的最新git commit的一部分

[22:38] <lj> “desk” do you mean local or do you mean my own git repo? Because I can’t get a copy of the whole repo

[22:38] <lj>“ desk”是本地的还是我自己的git repo? 因为我无法获得整个回购的副本

[22:39] <ParkinT> Don’t think of them as directories  A commit is an OBJECT that contains a whole set of files and folders

[22:39] <ParkinT>不要将它们视为目录提交是一个对象,其中包含一整套文件和文件夹

[22:39] <lj> sass is not a branch it is a directory

[22:39] <lj> sass不是分支,而是目录

[22:39] <scruggs> I like your comment about collaboration. I’ve seen a few web shops that set up multiple repos as ways to show things that are under development, things that are upcoming in the next release, and things that are currently “live”. Just was curious on your take on it.

[22:39] <scruggs>我喜欢您对合作的评论。 我见过一些网上商店,这些商店设置了多个存储库,以显示正在开发的内容,在下一版本中即将发布的内容以及当前正在运行的内容。 只是对您的想法感到好奇。

[22:40] <ParkinT> Scruggs, that is EXACTLY how branches were/are intended to be used.

[22:40] <ParkinT> Scruggs,确切地说/打算如何使用分支。

[22:40] <molona> But I’m cocern that at some point I would like someone to look into some files in a particular branch but I don’t want them to commit anything

[22:40] <molona>但是我很担心,在某个时候我希望有人查看特定分支中的某些文件,但我不希望他们提交任何内容

[22:40] <ParkinT>For example,  I want to try a new feature.  I create a feature branch, make my changes, test them and then push the changes to the test server.

[22:40] <ParkinT>例如,我想尝试一项新功能。 我创建一个功能分支,进行更改,测试它们,然后将更改推送到测试服务器。

[22:40] <molona> Altough it may be useful as a revision process if they did change the files with their comments, I suppose

[22:40] <molona>我想,如果他们确实使用注释更改了文件,那么作为修订过程可能很有用。

[22:41] <ParkinT> If they seem to work we can ‘decide’ to merge that branch into master and deploy.  If there is a problem we can hack at it some more.

[22:41] <ParkinT>如果它们似乎起作用,我们可以“决定”将该分支合并到master并进行部署。 如果有问题,我们可以进一步解决。

[22:41] <ParkinT> Good point, molona.

[22:41] <ParkinT>好点,莫罗纳。

[22:41] <ParkinT> The way you do this is to a) commit the changes on the branch, b) allow the collaborator to pull (from you or from a site like Github) the entire repo to their machine

[22:41] <ParkinT>执行此操作的方法是:a)在分支上提交更改,b)允许协作者(从您或从类似Github的站点)将整个存储库拉到他们的机器上

[22:42] <Sef> hey again, guys. it is just me or all of you have been disconnected? sorry for interrupting

[22:42] <Sef>再见,伙计们。 是我还是你们所有人都断开了联系? 抱歉打扰了

[22:42] <ParkinT> They then have that commit as part of the entire history, merged with whatever THEY had changed in the meantime.

[22:42] <ParkinT>然后,他们将提交内容作为整个历史的一部分,并与他们在此期间所做的任何更改合并。

[22:42] <blogjunkie> Talking about testing before deploying, would you have a checklist of things to check before deploying to production? I’m working with WordPress sites specifically

[22:42] <blogjunkie>谈到部署之前的测试,在部署到生产之前,您是否需要检查清单? 我正在专门处理WordPress网站

[22:42] <HAWK> Sef Can you see this?

[22:42] <HAWK> Sef您能看到这个吗?

[22:42] <scruggs> blogjunkie: always plan and test!

[22:42] <scruggs> blogjunkie:始终计划和测试!

[22:43] <ParkinT> Traditionally (and I am talking from experience back in the days even BEFORE the Internet), you have a list of ‘requirements’

[22:43] <ParkinT>传统上(我是根据互联网时代之前的经验谈的),您有一个“要求”列表

[22:43] <Sef> HAWK yep, im now connected, it’s just that I couldn’t connect for half an hour

[22:43] <Sef>没错,我现在已经连接了,只是我半个小时都无法连接

[22:43] <ParkinT> The testing process should be nothing more than validating that those requirements have been met.

[22:43] <ParkinT>测试过程只不过是验证是否已满足那些要求。

[22:43] <HAWK> Yeah, sorry about that. GitHub had an outage (ironically) and I use Gists to control access.

[22:43] <HAWK>是的,对此感到抱歉。 GitHub发生故障(具有讽刺意味的是),我使用Gist来控制访问。

[22:43] <HAWK> Of all the sessions for it to happen in!

[22:43] <HAWK>在所有会话中发生!

[22:44] <ParkinT> LOL

[22:44] <ParkinT>哈哈

[22:44] <ParkinT> The definition of irony, eh?

[22:44] <ParkinT>反讽的定义,是吗?

[22:44] <HAWK> I’ll post a transcript of the whole session up on SitePoint later today so you can see the stuff that you missed out on. In the mean time, if you have questions that are important, feel free to ask them

[22:44] <HAWK>今天晚些时候,我将整个会话的成绩单发布到SitePoint上,以便您可以看到错过的内容。 同时,如果您有重要的问题,请随时提问

[22:44] <blogjunkie> ok cool. is there a list of requirements that I can refer to? otherwise i guess i could compile my own and turn it into a useful blog post…

[22:44] <blogjunkie>好的,很酷。 有没有我可以参考的要求列表? 否则我想我可以自己编译,然后将其变成有用的博客文章…

[22:45] <ParkinT> In my experience, the set of requirements is derived (in collaboration with the client) before any work is done.

[22:45] <ParkinT>以我的经验,在完成任何工作之前(与客户协作)得出了一组要求。

[22:46] <ParkinT> Ultimately though, the requirements should be a list of “when it does this I will consider it done and I will pay you” from the client

[22:46] <ParkinT>最终,要求应该是客户提供的“当我这样做时,我会认为它已经完成并且我会付钱”的清单。

[22:46] <scruggs> also, it basically stems to the basics of problem-solving. what’s the problem and what steps are needed to solve the problem

[22:46] <scruggs>同样,它基本上源于解决问题的基础。 有什么问题以及需要解决什么问题的步骤

[22:46] <Sef> ok, i see :) well, i actually wanted to ask a couple of questions. first is – i would like to talk about automatic websites deployment via git. is it possible for me to commit to production branch so that it will automatically launch some builds scripts / tests / whatever and in case of success bring it all to my website?

[22:46] <Sef>好的,我明白了:)好吧,我实际上想问几个问题。 首先是–我想谈谈通过git进行自动网站部署。 我是否可以致力于生产分支,以便它会自动启动一些构建脚本/测试/等等,并且在成功的情况下将其全部带入我的网站?

[22:46] <molona> good question sef!

[22:46] <molona>好问题,谢夫!

[22:46] <ParkinT> Short answer:  ABSOLUTELY

[22:46] <ParkinT>简短答案:绝对

[22:46] <blogjunkie> thanks ParkinT and scruggs

[22:46] <blogjunkie>感谢ParkinT和scruggs

[22:46] <ParkinT> Another of the cool features of Git is a set of ‘hooks’

[22:46] <ParkinT> Git的另一个很酷的功能是一组“挂钩”

[22:46] <molona> good answer ParkinT but now expand, please

[22:46] <molona>好答案ParkinT,但现在请扩展

[22:47] <Sef> i know there’s a bunch of tutorials about this and continuous integration, but maybe you know some best how-to’s and stuff

[22:47] <Sef>我知道有很多关于此和持续集成的教程,但是也许您知道一些最佳的方法和知识

[22:47] <ParkinT> Github utilizes these very skillfully

[22:47] <ParkinT> Github非常熟练地利用了这些

[22:47] <ParkinT> Using hooks you can trigger any number of automated operations.

[22:47] <ParkinT>使用挂钩可以触发许多自动操作。

[22:47] <ParkinT> I work often in (Ruby on) Rails.  And one of my favorite tools (an open Source project to which I have proudly contributed) is Capistrano

[22:47] <ParkinT>我经常在Rails(Ruby on)上工作。 Capistrano是我最喜欢的工具(我为之贡献的一个开源项目)之一

[22:48] <ParkinT> It is an automated system that – in a simple explanation – reaches out to your Git repo (from the deployment server) and PULLS IN the recent changes (or any branch you specify).

[22:48] <ParkinT>这是一个自动化系统,通过简单的解释,它可以到达Git存储库(从部署服务器),并拉入最近的更改(或您指定的任何分支)。

[22:49] <molona> Does the automatic stuff that you can do depend on where your repository is? I mean, if I use GitHub, there are a number things that I can do but if I use other repository, I wouldn’t be able to do them? or would I be able to code them myself?

[22:49] <molona>您可以执行的自动操作是否取决于存储库所在的位置? 我的意思是,如果使用GitHub,我可以做很多事情,但是如果使用其他存储库,我将无法做到这些? 还是我可以自己编写代码?

[22:49] <sewmyheadon> We use Beanstalk for client work because it’s got built-in deployments that are easy for all our devs to setup.

[22:49] <sewmyheadon>我们将Beanstalk用于客户端工作,因为它具有内置的部署,所有开发人员都可以轻松地进行设置。

[22:49] <ParkinT> No.  Github has some simply tools in their GUI that help you hook into many common services.

[22:49] <ParkinT>否。Github在其GUI中提供了一些简单的工具,可帮助您使用许多常用服务。

[22:50] <ParkinT> But Git contains the hooks and you can utilize them in any way you choose; regardless of the host.

[22:50] <ParkinT>但是Git包含了钩子,您可以选择任何方式来使用它们。 无论主持人。

[22:50] <HAWK> Just a head’s up all – there is 10 mins left in this session. If you’re sitting on a question, make sure you jump in with it soon.

[22:50] <HAWK>所有人都要抬起头来–在本节中还剩下10分钟。 如果您要提出问题,请确保尽快加入。

[22:50] <molona> can you program new hooks if you need to?

[22:50] <molona>如果需要,可以编写新的钩子吗?

[22:50] <sewmyheadon> I also saw ftploy does deployments

[22:50] <sewmyheadon>我也看到ftploy进行了部署

[22:51] <chris> Another good thing to do with a hook is to run something to check your source against a coding standard before you commit, like PHP_CodeSniffer for example.

[22:51] <chris>与钩子相关的另一件好事是在提交之前运行一些东西以对照编码标准检查源代码,例如PHP_CodeSniffer。

[22:51] <ParkinT> Great point, chris

[22:51] <ParkinT>大点,克里斯

[22:52] <ParkinT> As far as I know the hooks exist and you would need to work on the Git source code (which is in a public repository) to make changes.

[22:52] <ParkinT>据我所知,钩子存在,您需要使用Git源代码(位于公共存储库中)进行更改。

[22:52] <molona> Ok, then I assume that you can create new hooks… and maybe use the hook created by someone else?

[22:52] <molona>好吧,那么我假设您可以创建新的钩子……并可能使用其他人创建的钩子?

[22:52] <ParkinT> I think they have already included everything you wourd ever need.

[22:52] <ParkinT>我认为他们已经包含了您所需要的一切。

[22:52] <ParkinT> Realize the hooks are triggers of events in Git.

[22:52] <ParkinT>意识到钩子是Git中事件的触发器。

[22:52] <molona> In my case, sure! I was just curious

[22:52] <molona>以我为例! 我只是好奇而已

[22:53] <ParkinT> There are only a finite number of events that occur.  YOu are flexible to use them in any way you choose.

[22:53] <ParkinT>仅发生有限数量的事件。 您可以灵活选择以任何方式使用它们。

[22:53] <molona> yeah, probably I should have said “action” instead of hook… I was curious to find out if Git could be custom, somehow

[22:53] <molona>是的,也许我应该说“动作”而不是“钩子”……我很好奇地发现Git是否可以自定义

[22:53] <ParkinT> Thank you, all, for the active participation.  I hope no one feels their question did get the proper attention.

[22:53] <ParkinT>谢谢大家的积极参与。 我希望没有人感到他们的问题得到了适当的重视。

[22:54] <ParkinT> There are many tools built to use Git in a number of ways.

[22:54] <ParkinT>有许多工具可以通过多种方式使用Git。

[22:54] <ParkinT> Mostly they are “shell” scripts.

[22:54] <ParkinT>大多数情况下,它们是“ shell”脚本。

[22:54] <HAWK> Yeah, it’s been a fantastic session. More of a mini-lecture really. You’ve done an amazing job thanks Thom.

[22:54] <HAWK>是的,这真是一场精彩的会议。 确实是一个微型讲座。 感谢Thom,您做得非常出色。

[22:54] <Sef> thanks guys, this was interesting, looking forward to full transcript

[22:54] <Sef>谢谢大家,这很有趣,期待完整的成绩单

[22:54] <chris> Thanks for hosting this!

[22:54] <chris>感谢您主持此活动!

[22:54] <Triopticon> I enjoyed it! :D

[22:54] <Triopticon>我喜欢它! :D

[22:54] <HAWK> No worries. :)

[22:54] <HAWK>不用担心。 :)

[22:54] <HAWK> I run one every week. The times change slightly so make sure you check the schedule

[22:54] <HAWK>我每周跑步一次。 时间稍有变化,因此请确保您检查时间表

[22:55] <blogjunkie> thanks all

[22:55] <blogjunkie>谢谢大家

[22:55] <ParkinT> Thank you HAWk.  :blushing:

[22:55] <ParkinT>谢谢您。 :脸红:

[22:55] <sewmyheadon> So, here’s my boneheaded question: if I have a repo and create a feature branch that contains all the same files as the original, just in different states and containing different code, when I switch to that branch all of the files in the repo effectively ‘change’ to mimic the state of the files in the branch I’m using?

[22:55] <sewmyheadon>因此,这是我的脑筋急转弯的问题:如果我有一个回购协议并创建一个功能分支,当我切换到该分支时,该分支包含与原始文件相同的所有文件,只是状态不同且包含不同的代码存储库中的所有文件都有效地“更改”以模仿我正在使用的分支中文件的状态?

[22:55] <molona> and Hawk, of course

[22:55] <molona>和Hawk当然是

[22:55] <molona> and the rest

[22:55] <molona>,其余的

[22:55] <ParkinT> Sewmyheadon, you are absolutely correct!

[22:55] <ParkinT> Sewmyheadon,你绝对正确!

[22:56] <sewmyheadon> Thanks! ParkinT

[22:56] <sewmyheadon>谢谢! 帕金特

[22:56] <ParkinT> It is best to think of each COMMIT as a snapshot of the STATE of those files

[22:56] <ParkinT>最好将每个COMMIT视为这些文件的STATE的快照。

[22:56] <ParkinT> A moment in time, like a photograph.

[22:56] <ParkinT>时刻,像一张照片。

[22:56] <ParkinT> Good bye/night/day all

[22:56] <ParkinT>再见/晚上/白天全部

翻译自: https://www.sitepoint/we-talked-git-with-an-expert-the-transcript/

git --git-dir

更多推荐

git --git-dir_我们与专家讨论了Git-成绩单

本文发布于:2023-06-11 00:53:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1363723.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:成绩单   专家   git   Git

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!