We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

GitHub Power Tools

00:00

Formal Metadata

Title
GitHub Power Tools
Title of Series
Number of Parts
170
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Most developers think of Git and GitHub as two sides of the same coin, but all too often our attention is focused on the Git side alone, and not on the capabilities of GitHub as a collaboration platform. Millions of people have already joined the site that offers amazing features like pull requests, project pages, integrated web site hosting, issue tracking, prose collaboration tools, permission controls, and easy integration with third-party services. Come to this talk to learn how to make better use of GitHub through the site's commonplace and advanced features alike.
AreaRepository (publishing)Lemma (mathematics)Web pageDataflowDisk read-and-write headElectronic mailing listBitRepository (publishing)CollaborationismSoftware repositoryCore dumpNormal (geometry)Web 2.0Right angleCodeComputer virusSlide ruleMultiplication signComputer fileLaptopOnline helpRow (database)Text editorNeuroinformatikWeb pagePhysical lawInformationVisualization (computer graphics)Category of beingInternetworkingWeb browserSet (mathematics)Message passingTrailView (database)BlogProjective planeIntegrated development environmentForm (programming)Power (physics)System callComputer animation
Electric dipole momentPulse (signal processing)Reading (process)CloningHill differential equationMaxima and minimaTime zonePairwise comparisonGraph (mathematics)Computer networkLemma (mathematics)Term (mathematics)Information privacyMenu (computing)Simultaneous localization and mappingSystem on a chipDirectory serviceComputer fileReading (process)View (database)Multiplication signCodeWeb browserProjective planeOpen setLine (geometry)Branch (computer science)Direction (geometry)DataflowArithmetic progressionArithmetic meanCommitment schemeRight angleWeb 2.0Data managementRepository (publishing)Expected valueINTEGRALHome pageType theoryOpen sourceText editorWeb pageSampling (statistics)WordCuboidBitStack (abstract data type)Group actionPhysical lawParameter (computer programming)Computer-assisted translationVisualization (computer graphics)Medical imagingSystem callTouchscreenCASE <Informatik>
System on a chipPulse (signal processing)Computer networkHill differential equationWritingWebsiteFunction (mathematics)Task (computing)Electronic mailing listNormal (geometry)EmailTerm (mathematics)Maxima and minimaGamma functionMathematicsInformation privacySimultaneous localization and mappingExecution unitString (computer science)Chief information officerWeb pageArrow of timeDescriptive statisticsLink (knot theory)BitSoftware bugVideo gameType theoryComplete metric spaceCodeBranch (computer science)Electronic mailing listDot productData conversionGoodness of fitSoftware repositoryArithmetic meanTouchscreenComputer fileSymbol tableOpen sourceMarkup languageLine (geometry)Online helpAsynchronous Transfer ModeCollaborationismEmailProjective planeComputer configurationRight angleProcess (computing)TelecommunicationMathematicsComputer clusterPoint (geometry)Direction (geometry)NumberWeightReal numberDreizehnTablet computerComputer animation
CloningTraffic reportingRepository (publishing)Local ringModule (mathematics)Software repositoryTrailRecursionTemplate (C++)Network topologyCodePunched cardDirectory serviceSoftware protection dongleGraph (mathematics)Pulse (signal processing)Asynchronous Transfer ModeObject (grammar)Image resolutionConnectivity (graph theory)Total S.A.Staff (military)Branch (computer science)Disk read-and-write headFigurate numberBranch (computer science)Video gameRight angleComplete metric spaceDirectory serviceComputer fileGreatest elementSocial classComputer animation
QuiltMenu (computing)Point cloudComputer fileProgrammer (hardware)ModemSimultaneous localization and mappingLine (geometry)Coma BerenicesTerm (mathematics)Information privacyRandom numberSource codeNormed vector spaceCurvatureWritingMassSoftware repositoryAdditionLine (geometry)Web pageData conversionMultiplication signEmailOnline helpComputer fileDifferenz <Mathematik>Reading (process)Confidence intervalSource codeGreen's functionDrop (liquid)File formatRight angleElectronic mailing listPoint cloudRevision controlMultilaterationMedical imagingCuboidComplex (psychology)Greatest elementInheritance (object-oriented programming)NumberMathematicsContent (media)Coma BerenicesOvalFiber bundleUniform boundedness principleGoodness of fitDrag (physics)CodeAsynchronous Transfer ModePlastikkarteComputer-assisted translationComputer animation
MIDIRaster graphicsObject (grammar)Total S.A.Programmable read-only memoryStaff (military)Computer filePower (physics)Reading (process)Commercial Orbital Transportation ServicesBranch (computer science)Repository (publishing)BitOnline helpComputer animation
Disk read-and-write headWeb pageInclusion mapSummierbarkeitRule of inferenceMaxima and minimaReading (process)Power (physics)Programmer (hardware)Point cloudEmailPhysical systemWeb 2.0Field (computer science)Programmer (hardware)Poisson-KlammerElectronic mailing listMultilaterationMetadataCodeSoftware bugType theoryAsynchronous Transfer ModeNumberThread (computing)Link (knot theory)Sign (mathematics)Metropolitan area networkTrailHacker (term)Point (geometry)Square numberWordHyperlinkState of matterSet (mathematics)Right angleChecklistTouchscreenCorrespondence (mathematics)Computer clusterComputer programmingBranch (computer science)WritingQuicksortDataflowCuboidComputer animation
Convex hullBranch (computer science)Physical systemSoftware bugDefault (computer science)Line (geometry)Text editorDisk read-and-write headCommitment schemeHand fanMessage passingRight angleCuboidComputer animation
Programmable read-only memoryForm (programming)Electric currentObject (grammar)Data compressionThread (computing)Branch (computer science)TrailMIDINormal (geometry)Inclusion mapSummierbarkeitRepository (publishing)Wechselseitige InformationRange (statistics)Menu (computing)CurvatureNormed vector spaceComputer iconTerm (mathematics)Information privacyConvex hullInformation managementReading (process)PredictabilityWeb pageLie groupSystem callFormal grammarGraph (mathematics)Computer networkPulse (signal processing)CloningRight angleSoftware bugNumberClosed setBranch (computer science)Goodness of fitLine (geometry)ScalabilityWordView (database)TouchscreenOpen sourceMultiplication signCollaborationismSoftware developerWeb pageCategory of beingMathematicsDefault (computer science)Message passingGroup actionRepository (publishing)40 (number)Source codeCountingWeb crawlerOnline helpSoftware repositoryComputer fileCodeBitTouch typingInsertion lossChannel capacityDifferent (Kate Ryan album)Pairwise comparisonDigitale VideotechnikSelf-organizationVolumenvisualisierungComputer animation
Pulse (signal processing)Lie groupDisk read-and-write headTerm (mathematics)Web pageCloningInformation privacySummierbarkeitElectric dipole momentReading (process)Uniform resource locatorMenu (computing)Correlation and dependenceMusical ensembleMaß <Mathematik>Formal grammarLetterpress printingRepository (publishing)Execution unitWebsiteFile formatSynchronizationVirtual machineProgrammable read-only memoryBlogGoogolBookmark (World Wide Web)VideoconferencingData conversionMappingWebsiteDomain nameComa BerenicesDecision theoryMedical imagingEmailQuicksortOpen sourceWeb pagePoint (geometry)Default (computer science)Template (C++)Repository (publishing)PlastikkartePhysical systemWeb 2.0InternetworkingProjective planeContent (media)CollaborationismCoefficient of determinationSelf-organizationReading (process)BlogRight angleSet (mathematics)AsymmetrySoftware repositoryWell-formed formulaGenderFood energyLibrary (computing)40 (number)Goodness of fitDenial-of-service attackMultiplication signSineBranch (computer science)Greatest elementFilm editingArtificial lifeComputer fileConfiguration spacePoint cloudUniform resource locatorBlock (periodic table)Computer animation
Object (grammar)Web pageStaff (military)Branch (computer science)Total S.A.Price indexEmailSheaf (mathematics)Power (physics)Branch (computer science)Web pageRoutingProjective planeGraph (mathematics)Web browserBridging (networking)MathematicsElectronic mailing listWeb 2.0Directory serviceBitWebsiteComputer fileRight angleFront and back endsConnectivity (graph theory)RootMarkup languageRepository (publishing)Source codeComputer animation
BlogTerm (mathematics)Projective planeWeb pageContent (media)WebsiteSoftware frameworkGrothendieck topologyWeb 2.0BlogReading (process)VolumenvisualisierungPlastikkarteMathematicsCuboidComputing platformBranch (computer science)Markup languageEvent horizonMultiplication signCountingGoodness of fitXMLComputer animation
Transcript: English(auto-generated)
All right, welcome. Hello, welcome to GitHub Power Tools. As you can tell, that's where we are. This talk has no slides. We're just going to do things together. I might leave a repository that has some notes in it at the end or something like that, but otherwise, take notes.
You'll probably have some opportunity to interact a little bit through a repo if you want. So if you've got a laptop, as you've noticed, the Wi-Fi here is amazing. So you shouldn't have any trouble getting on GitHub and working here. If you happen to be staying across the street at the Radisson,
you know that Wi-Fi isn't always amazing. So it's nice to be here. Everybody enjoying the show so far? Good, all right. Next question, who is using GitHub right now? Almost everybody. Who is not using GitHub right now? Don't be shy. It's okay? We can still be friends? All right, cool.
Well, what I hope to show you today is a few features in GitHub that you don't already know. Some of this stuff you might know. I've given this talk before, and I've had some people say, well, gee, those aren't power tools. That's our normal workflow. So maybe you have a sophisticated workflow.
I think everybody's going to pick up at least a few tips. And hopefully, really by the end of this session, you should have kind of the core set of features down that I think are really important features for you to be working with. We'll be doing most of our work in the browser. I'll downshift to the command line a little bit.
We'll look at things from command line Git, probably. That'll make sense. But really, let's dive in, and let me show you what I'd like to do. Now, I am going to do this all in GitHub. And so we'll call this NDC Oslo 2014.
That's the name of our repository. That's going to be a public repository. So all of you will be able to see this. The whole Internet will be able to see this. And with that, yeah, good enough. I'm just going to create that repo. And we're done. So there. I have a repository now. And this is not a path you go through all that often.
I wouldn't quite call this a power tool. This is kind of preparatory stuff. But still, you don't create new repos. Most of us don't create new repos all that much. You jump into a project that's already there. So this is a somewhat unfamiliar path. And because it's an unfamiliar path, GitHub gives you lots of help there to show you what's up. What I'm going to do is I kind of have to jump ahead a little bit
because I'm going to use the built-in issue tracker to keep track of our agenda. So issue tracker is a thing on our agenda, but I have to use it to build the agenda. So let's go ahead in here. I am creating a new issue.
And this will be our topics for the session right here. And what should we do? Well, I'd like to cover pull requests. I think that's really important. I want to talk about forking and make sure everybody's very clear on what forking is versus what branching is. We should cover issues.
I used to teach people how to use GitHub for a living. And when I did that and we'd get into the issue tracker, the most frequent thing I heard was, oh, it has an issue tracker? Yes, it has an issue tracker. And it's pretty nice. It's very simple, very lightweight, but you can do some nice things with it. So we'll talk about issues.
We'll talk about animated GIFs. That's a very important feature. There's no way we could really survive without that. GitHub Pages. There's also built-in website hosting for free with every public repository. My blog, timberglund.com,
gets about one post every six months. So it's not exactly a heavily trafficked blog, but that's hosted on GitHub Pages, so I don't pay anybody web hosting for that. That's just public repo on GitHub. GitHub Pages and maybe some prose composition tools. We'll take a little bit of a look at how to use GitHub
for non-code things. There's a whole lot of work that you can do. Oh, wait, I forgot something. So-called web flow, we need that. There's a whole lot of work you can do in GitHub that has nothing to do with code. Now, most of the time, you're going to want your artifacts to be text files,
but a lot of knowledge gets created and collaborated on in forms that could be done as text files. So we'll take a look at some prose composition tools and ways even so-called non-technical or non-coding people can use GitHub to work together. So there we are. Anybody else? Any requests?
Something else you want to see? No. All right, if you come up with one, let me know. I maybe can't hear you. I certainly can't see you. All I see are two bright lights. As far as I know, I am about to be abducted by a UFO, and there are no other human beings in the room. What's that?
Rebasing. Okay, rebasing is more of a Git thing, and so if time goes well, if I don't talk too much, that's unlikely, frankly. We'll talk about rebasing. That is a great feature. It's more of a core Git thing, so might not get to that there. But there we are. There are topics that you notice
that I was using markdown, the markdown syntax, which I'll come back to, and it's rendered for me now. I've got that nice big topics for the session heading and a bulleted list. And I have a collaborator already. I want to see more of this. This D. Graham guy, whoever he is, I like him.
All right, so if you want to jump in on anything I'm doing, any pull request, any issue, if you know how, if you've got a laptop, do it. Now, David has sent me a coded message. The squirrel wearing the fedora. What does that mean? Well, let me mouse over.
He's trying to say get to work. This is kind of an inside GitHub joke. That squirrel to them means ship it. So let's go ahead and ship it. All right, let's go back here. This is in the issue tab here. I'm going to click on the code tab and go back to this view. Now, this is an empty repository.
There's not a lot I can do. Normally I would be cloning this down on my computer and using visual studio or a text editor or an IDE of some kind to work down there. But again, we're going to stick to the web flow here. So I'm going to follow GitHub's directions. It says every directory should include a read me.
Well, I click on read me and suddenly I'm in a text editor. I'm editing a file called readme.md. So let's go ahead and do this. And this will be the NDC Oslo GitHub power tools. Various cool GitHub features, jokes, squirrels.
And probably I will not be able to stop some American slang happening. It just comes out. So stop me before I kill again. There we are. So now I have created the read me and I can commit that file. When I do that, I'm back to this is like the normal,
familiar GitHub view. You guys are all GitHub users. We're finally looking at the code view, which makes a little bit more sense. One thing, read me, any file called read me, that's a magic word in GitHub and it's going to be rendered on the project page. And people can get quite elaborate with their read me's.
You can put, in this case, it's a markdown file. You can use the markdown syntax to embed images and have highlighted syntax, highlighted code and all these cool things. And I'll probably do some of those as we move along. That lets you put a fairly substantial project home page
in your read me. If it's an open source thing or if it's a thing inside your company, this should give people an idea what the project is, how to get it, how to build it, how to use it. If it's an API, a code sample. If it's a tool, how to run it. You can put all that stuff in the read me. That's not what I want though. I want to type in some poems.
So I need to create a new file. Let's think about this though. Let me go back to my agenda. I'm going to open that agenda in a new tab. There's my power tools agenda. Web flow, web flow, okay. What are some things I could do? Now, I want to modify this repository and most of you are Git and GitHub users
so you know that if I'm going to do work, I should probably do the work in a branch, right? Probably don't just commit right against master. Now, there are times when committing against master is an entirely appropriate thing to do. I'm going to say for the purposes of argument, today is not that day. I'm not going to commit against master. I'm going to make a branch. The good news is I can do that from the browser.
Now, again, maybe you're doing this from inside the visual studio integration. Maybe you're doing it from the command line. There are people you work with who might be able to make GitHub work for them if they can do things through the browser. This is really important to some people. So I'm going to do this branch
and I'm going to call this branch Strange Ascetic. That's the name of the poem we're going to use today. I type that in, I create the branch, and I am now on that branch. It says right there, you're on the branch, Strange Ascetic. I can switch between the branches with that select box in a way that you'd expect.
It's good. I've made a branch. Now, I will create a file. So to do that, right up here on this line, that plus there, when I click on that, I'm back in the text editor creating a new file. I can even create directories.
Let's say I want a directory called poems. I'll say poems slash, and it says, oh, you must mean directory, and I'll call this Ascetic.text. And we'll give it a title, the song of the strange ascetic,
and we'll give a couple lines in there. Purple vine, slaves should dig the vineyard, and I would drink the wine.
Okay. We have added that new file. Get started on some Chesterton, because why not? There we go. So I've got that new file. I can go back and look at the overall code view.
Now, GitHub has noticed. It says, hey, you've got a new branch. It puts this line in right here. It says, do you want to create a pull request on that branch? I'm going to say not yet. Okay, let's not do that yet. I want to make sure we know what we're doing. And I don't know if you ever use the web UI to check out what's going on in a project. You can get a very simple log view.
I just clicked on where it said commits, and now I can kind of see the commits that I've done. I can go browse the code for each one of those. So this helps right now, for example, in my role at DataStax, where I work, there's kind of a writing project I'm overseeing. It'll be a cool thing. It'll be available to the public in a few months. And I've got a non-technical manager
who's interested in the progress of that writing project. Well, I can send that person to this page and say, hey, go take a look at these commits here. You can see who's writing, who's getting their work done, crack the whip, whatever it is that has to happen. There's nice non-technical uses there. All right. Let me go in and throw one more commit in there.
Higgins is a heathen. His slaves grow lean and gray. That he should drink some tepid milk exactly twice a day.
Sounds very British. All right, good deal. Now, let's say I would like to ship that work.
Let me go back to the browser. All right, all right. I just happened to notice something here. I'm looking at the screen, at the page, and I see there is a pull request open on this repository. So you guys are doing what I asked you to do. Now, there are people in the room
who don't know what pull requests are yet. I'm sure of it. I'm not going to take a poll, but I'm going to do a pull request first, and then whatever intrepid soul submitted that pull request, I will look at it. I'm not going to say I'll merge it yet because I don't know what's in it. We'll find out. I'm going to make my own pull request first. So anybody else who wants to make trouble like that,
I don't know who did this, but they're doing the right thing. If you want to do more of that, please bring it on. That's just going to make this more fun the more people get involved. All right. This is a little bit contrived because this repo belongs to me, and I'm the only one who can write to it. And so I'm branching,
and now I'm going to go through this very careful process of how I merge that branch. In the real world, sometimes I will use Git for things that are just me and me alone, like a zero-collaboration project. I'm just collaborating with myself. And using Git and using GitHub can still be useful. I typically do not branch in those scenarios because there's often not a lot of doubt
about whether I want the work that I'm doing. But branching, you're going to see this in a minute as I do this pull request. A branch isn't just a way to separate work or to indicate that work is experimental. It's nice. Like, if I'm working on a project by myself,
I might say, well, I don't know how this is going to work out. Let me branch, and if it doesn't go well, I'll just roll back and I'll delete the branch and forget about it. A branch is fundamentally, in GitHub, a place to have a conversation. It is not fundamentally a place to experiment. I mean, it is a place to experiment. That's true. But the most basic reason for a branch
is that it's saying this work, this stuff, I want to talk about this. Okay? So let me do that. I have created this branch called strange-ascetic, and I'm going to take the bait and click on that button that says compare and pull request. I clicked the button, and GitHub has done some stuff for me,
and I need to point some things out on the screen. If you've ever done this before, this is really confusing. But right at the top, right there, it says, you've got this branch, that's that little symbol there, this branch called strange-ascetic, and dot, dot, dot, the implication is, it's coming from over here, flowing to here,
going into, I'm going the wrong direction, sorry, going from strange-ascetic, and it's going to get merged into master. It's like those three dots there, that should almost be an arrow that points into master. That's really what that means. We're merging, we're considering merging strange-ascetic into master.
Okay, for my pull request, I gave it a subject, and I gave it a body. In real life, when you submit these, you do want the subject to be meaningful, you want someone to be able to look at that and get an idea of what the PR is about,
and if you want more detail explaining your work, like if you're submitting a PR to an open source project, you might want that description there to be like the body of a short email. And I have options in here. You saw I typed colon, so far that's just text, and I typed colon, and I get this little pop-up.
Well, now I am in the world of emoji, and on GitHub, emoji is a very important means of communication. I don't know how people get by without emoji. I don't know what life was like three years ago before it was a thing. So I type colon, and then I can type the name of an emoji character, and the list kind of narrows down.
I'm going to go with sparkles. That's pretty conventional. And maybe metal. I mean, I'm in Norway, right? So some metal. And if I want to know what that looks like, I can hit that preview tab, and I preview it. So emoji is there, and really, in general, this link right here, if I click that, I get a help tab that opens up,
and remember how I was saying how the Wi-Fi is great? There we are, okay. I get this awesome help page that tells me all about this little markup language called GitHub-flavored markdown. What I'll do is I'm just going to do some markdown things as the talk proceeds.
I might not stop and explain each one, but when you see me do something that doesn't look like plain text, that's because it's GitHub-flavored markdown. All that stuff is documented in here. It's good stuff, and we'll leave it there. So I have now created a pull request. And remember what that pull request means.
That pull request means I want to talk about this. It might also signal that I'm done, and that's often the open source mode when there's this thing out on GitHub and you need to fix a bug, then you fork it. We'll talk about forking a little bit. You make your changes, and you submit a pull request with a complete bug fix, and the meaning of that is,
basically, you're saying, here, I made this for you. Please take it. Fundamentally, you're saying, I'd like to talk about this, and you can even open a pull request before the work is done, like I have here, if you want the conversation to go on. All right.
So it looks like I have some collaborators. And this is good. This dgram guy has given me an animated GIF. And let's see. Aha! Gep13 has legitimately pointed out a bug.
Thank you. I'm going to wait on that. I'm going to wait. I appreciate the collaboration. But I have an agenda here, and I'm going to show you something else in a little bit. I'm going to wait on that. But let me show you how he or she, I don't know who this person is, this person did that.
Over here in the files changed tab, I'm actually able to make line by line comments on all this. Now, this clearly should read, if I had been a heathen. And that's where the bug is. So what Gep13 did was just mouse over to there, click on the little balloon,
and I just had a little conversation with this person
that I possibly have never even met online. With emoji in there, so that's important. And we're, you know, as if we're doing a little bit of code review. I love it. Now, life isn't over. You know, the work isn't over
just because I submitted the pull request. All right. I can keep working on that branch, and any commit I make to that branch is going to show up in this pull request. I'll prove that to you this way. Here, let's go back here. And actually, what I'd like to do, if you don't mind, is I'm going to figure out how the clipboard works.
There it is. Hey, it's GitHub power tools. It's not clipboard power tools. So I've got a copy down here.
I could do some work on that branch right here. In fact, I'm going to do that. I'm going to check out a strange ascetic, and now we see we have a poems directory with that file in it.
So I can do some more work down here at the command line. I had been a heathen, have praised Nayara's curls, filled my life with love affairs,
my house with dancing girls. Trust me, this is going somewhere good. Completely classy poem. You have nothing to worry about. So I'll just add it and commit it, assuming that we kind of basically know some command line, get stuff, and if you don't, I can connect you to some people who can help.
So here we are. Make that commit and push it, and as I push that work and I go back up here and into this PR, that new commit shows up down at the bottom as Nayara. And actually the cool thing is,
if you're on the pull request page and commits come in, they'll just automatically, they're auto detected and they just show up in front of you. So if it's an active pull request, you will just see the page changing in front of you. So let's just consider this good for now. It doesn't really look done, but I'll say this isn't quite right,
but you can't make an omelet without breaking a few eggs. That is, that's kind of an American idiom
that means essentially YOLO. Now what I just did there is I went to my desktop, Explorer, Finder, whatever, grabbed GIF, dropped it into this comment box. Comment boxes are a magical place. Not only does markdown work, not only does emoji work,
but they are drag and drop targets. And when I drop a file on there, it just uploaded that to this place, cloud.githubusercontent.com, whatever on earth that is, and replaced the drop target with markdown pointing to that file. So now that image, that's how those people were getting those images in there.
Just drag and drop, it's as simple as that. So YOLO, it's not done, but we're going to merge it anyway. And there we go. The pull request is now closed. This conversation is basically over, and when I go back to my main pull requests tab, that is gone. Number six is gone from the list.
So if you don't mind, I'm going to look at a few of these and just kind of see what people are thinking. Here someone has edited the read me, and what they have done is, as you can see, removed that last bullet. So now I am not permitted to use American slang. And the bummer is about that,
that you know how it is, right? Sometimes it just comes out, and you don't know you're doing it. So I don't know if I can really merge this. I'm going to think about it. I'm going to say, I can't make any promises. All right. I'm going to let that sit on the side for a few minutes.
D. Graham says it needs more squirrel. Now, what did he do? Ah, he added a bullet for additional squirrels. That sounds good to me. Now, this is a diff, okay? This is a diff of a markdown file, and it's a trivial markdown file. So there are, I think, zero people in the room
who are confused about what's going on right now. Somebody added a line, and it shows up with a plus and in green. And you saw the line that was removed had a minus, and it was red. You get it, okay? What is harder is when it's a complex piece of text with lots of stuff that has changed. I'm going to try to come up with a more interesting version of this in a few minutes,
but I want to point you to these two tabs. They're very easy to overlook. Source is pressed. I'm looking at the source or the actual markdown. When I click on rendered, now I see the rendered markdown with, and I don't know, can you see? It's very faint on the projector and on the confidence monitor here, but a really faint kind of lime green
highlighting to that line. So if you compose text, non-code text, in markdown or ASCII doc or textile or a format that GitHub supports, the prose diffs will show red and green markers and strike through and everything of how the file has changed.
Super helpful. Louder? David, does that apply to syntax highlighting code? I don't think it does. No. No, I had to ask a GitHub-er, and he says no. Now there's another speaker at the conference here
who was actually instrumental in this feature. There's a GitHub-er here who helped build some of this, so it's cool stuff. I can't tell you how many times when I'm working on text and it's not in a GitHub repo where I want this. You want to know what's changed. I have a 17-year-old daughter,
and I was collaborating on her with an email she was going to write to a bunch of people. It was a couple paragraphs. It was no big deal. I made some changes, and I just sent them back to her in an email. I felt like a total jerk, like how is she supposed to know what changed? If it's not inside a repo, how do you know what's going on? But it's a good idea to try to get this stuff in a repo to try to get text like this here, and you get some nice stuff.
So I'm going to go with David's squirrels. Looks good to me. Gonna ship it. And David says metal. Good, all right. One more pull request. I want to see some more trouble that you guys have made. Somebody has complained about cats,
and yeah, okay, fine. That's enough of that. All right, so when I go back to master,
now I see in my readme we have squirrels and cats, and American slang is still there. We'll come back to that pull request later. I'll ask you towards the end if I got away with no slang. Now let me go back to my command line and see what's happened. Now I just merged things into master. I'm still on my strange ascetic branch.
I don't know if I really need that right now, so I'm just going to go check out master, and I'm going to do a pull, and that's going to update master. So now I'm all up to date with the stuff that's going on up there. Thanks for your help. And we can see in the log some neat things have gone on.
That's the evidence of merged pull requests that have happened in the repository. So we'll let that play out. We'll take a look at that as work proceeds.
And a little bit of cleanup here. Ah, you know what, folks? My branch, my strange ascetic branch, I don't really need that anymore, do I? So let's go ahead and delete that. And we will push that delete up to GitHub.
We don't need that branch to exist up on GitHub anymore either. All right. That looks pretty clean. I like the look of that.
So I'll go back up here, just give us a refresh. There's still some pull requests lurking around there, but I want to go remember what it is we're supposed to be doing. I need to keep my eye on that agenda because we only have an hour together, or about another half hour together. So what we've done is we've looked at web flow, we've looked at pull requests.
I, you know, I want to tweak this a little bit. Instead of those, I'm going to put a dash and square brackets instead of just a regular bulleted list. This is another thing you can do with issues. Let me update that.
Now it becomes a checklist. And I can check those things off. That actually modifies the state of the issue. If I go back and edit that again, you can see there are Xs there. So issues are a super handy way to keep track of, and this is, you know, not unusual for code you're going to write.
There might be, you know, here's six things, we need to make sure they happen. You can make it a checklist like that. So our agenda is now a checklist. We're skipping ahead, and we're focusing on issues right now. So some things we can do. Ah, Fred. Good point. We'll get there. That's one of the places I want to go.
An undocumented URL hack.
Issues. Now, let's go back and look at our list of issues. The first thing I notice is that three issues showed up that I didn't create. That's because those are the issues that correspond to pull requests. Every pull request has a corresponding issue. In fact, you can think of a pull request as an issue with code attached to it.
But that's not all we have. We happen to have those, but I want to create another one, because there is a bug in the strange ascetic. It was pointed out in the PR,
but TL Berglund merged it anyway. No, we don't have a UR emoji for cowboy. Now, I just did another thing. I mentioned somebody.
I mentioned myself, of course, but at and then the GitHub username, like I could say, hey, dgram, could you weigh in on this too? So I just mentioned David Graham. David Graham is going to get either an email or a web notification or both,
depending upon how he has his notifications set up, but I have pulled that guy in. He's subscribed to this thread now. He's going to get notified of everything that happens in it, probably, depending upon how his settings are configured, but he certainly got an email when I mentioned him or a notification of some kind.
So I got his attention, brought him into the discussion. He doesn't have anything to say right now. He's usually a man of few words. It'll probably happen later. But here we go. This is a second issue. Now, I wonder, ah, there you go.
David just weighed in. He said, sounds good. Thanks, David. I can't recall the issue number. The first pull request I created, was that one or two?
I can't remember. I want to reference it here. I want this issue to be linked back to that other work I was doing. So I want to say, for reference, you should see, and if I knew the number, I could just type the number right now.
Like if it was issue 645, that would just work. I don't know the number, but I think it said something about poem in it. There it is. Okay, that's right. So I want to link to an issue. A link to an issue is a pound sign and the issue number. Then those two issues are connected. I'll get a hyperlink in the history.
A lot of people don't know that that works at all, and it's super cool for kind of keeping track of the relationships between things. If you want to say that one issue depends on another, you could indicate that with a link. If you don't remember the number of the issue, you can just start typing some words from the title, which I did there, kicking off a new poem.
Oh, yeah, that's right, it's number 6. I'll hit enter, and I get that. So now this issue, number 8, is linked to issue number 6. I could follow that link, and issue number 6 is linked back to 8.
So when I link to an issue or a pull request, that issue or pull request automatically gets a link back to me so we can connect things in that way. And I'll point out again, this comment box, all the same stuff we've had all along, I can drag and drop, I have GitHub-flavored markdown, I even have the so-called Zen mode where I can edit full screen.
This, in my opinion, is a temptation to create very long posts in issues, and there are at least two problems with that. So, you know, be careful. If you're going to use Zen mode, don't yield to that temptation, or just don't use Zen mode. That's also pretty safe. But it's there if you want it.
All right, so what do we got? We've got mentions. We've got links. We have tags. Now, I haven't done anything really useful with tags yet, but for example, this guy, I might label this as a bug, because it is a bug.
Needs more squirrel? That sounds like that is an enhancement. And those exist already. If there are other labels that don't exist, well, I'm free to create those the way I want. Like, I would create a label called Poem. And Programmer Poem and Bug in the Strange Aesthetic,
those are both associated with poems. So I'll apply those labels. And now, obviously, I'm able to filter issues by labels. So labels are meant to be kind of the emergent metadata system in GitHub issues. You can't go into an issue and say, hey,
I want every issue to have these six other fields to it. There's no custom metadata, all right? There's just the discussion thread plus the tags. But you can use tags for pretty flexible things. That works out fairly well.
All right. I want to do one more thing with issues. I want to do one more thing with prose edits. So how's this going to work? Now, I'm going to go down to the command line again, make sure we're up to date here. Cool. We're up to date. I'm going to go make a new branch.
Now, I created a branch and switched to it in one command. That's that checkout-b bug fix. And now I'm going to edit the aesthetic.text if I had been a heathen.
Add that, and I'm going to commit it as well. No. Ah, there we are. I have git configured on my system to use TextMate as my default commit editor.
Right out of the box, git uses vi as a default commit editor. I love vi for editing small amounts of text. I don't have a problem with it at all. But TextMate's a little more fun, so I've configured git to use TextMate. That's why that popped up like that. Now, what I want to say here is I want to say fixed verb form in first line.
That's a pretty bad message. I'm not really a big fan of that. What I really want is to indicate that it fixes an issue. I don't remember off the top of my head what issue that was. So we'll just go back, and that's bug in the strange aesthetic. That's issue number eight.
We see that eight right there. All right, so I'm going to go here, and I'm going to say this fixes number eight, or I could say closes number eight. I'll save. I'll push. Here, let's do this right. I'll go into the strange aesthetic issue.
I'll do the push. No, I won't do the push. Good deal. Okay, so I just pushed that bug fix into a branch.
This issue, number eight, and I put that magic text, fixes number eight, this issue is still open because I pushed the fix to something that wasn't master. All right, now that fixes message is magical, and GitHub will find that, but it'll only find it when it's committed to the default branch.
And the default branch, by default, is master, and that's what it is right now. So let me fix that. What would you say I should do? I think maybe I should make a pull request. That seems responsible to me. So let me create a new pull request
where I'm going to compare bug fix into master. All right, and you may notice it's a little smarter about what's going on here. It says, well, you took one line away, and you added one line. Really what you did is you added the word had. So that's good. Let me create that pull request.
I'm going to leave all that as the defaults. We're back in the pull request view, and that's kind of funny. I was just looking right now for the source and rendered buttons that we saw before.
Is anybody willing to guess why there is no source and rendered button on this screen right now? Because it's a text file, nothing to render. Well, sure, there's something to render. It's rendered. You can see it right here. This is just what it looks like.
So maybe if we have time, I'll play with a markdown file a little bit, and we can see that prose diffing take place. And we automatically have word diffing showing up in this text file for us. So that's a nice hint there.
I'm going to go ahead and merge. David really wants me to move ahead with this thing. We have another squirrel. And for that, I'm going to find an appropriate animated gif for David. I'm going to upload an ominously named gif.
Wait for it. Don't pause there. It's so cruel, it's pausing. It's even worse. I might not be able to make you wait for it.
All right, now we can watch it all the way through. Touch the spider. I believe this is a spider from Australia. If you talk to an Australian about these, everybody's got a story. And finally, oh, it's so horrible.
Okay, merge it. That's what I say to squirrels. And now, and also by the way, this popped up before, and I didn't highlight it. GitHub has said, well, you've merged the branch. You probably don't need it anymore. Let's keep things clean and delete that branch.
And now when I go back to look at issues, what is missing? There's a bug in the song of the strange ascetic. Issue number eight is no longer shown here because it's a closed issue. I click on closed, and there we go. It's closed because I wrote that text in the commit message
and then later committed that, merged that into master. That shows up as closed there. All right, that's probably, here, let's go into the agenda. That is probably all the fun we have to have with issues for right now. The other best thing to do with an issue is simply to close one and then get that work done.
But these, again, you can use these not just for bugs and features, but really for organizing work. I have worked in capacities in the past where a lot of my activity from day to day was coordinated, and I collaborated with other people
through comments on issues. That's totally doable for lots of different kinds of work. I think we have adequately covered animated GIFs. I hope so. I would like to cover forking briefly, just so everybody has a clear idea what that means, and then we'll look at GitHub pages and probably have a couple minutes for rebasing.
So, forking. Here we are in the view of my repository. Now, I look up here, and there's a button that says fork, and there are seven of these. So, seven intrepid, or six intrepid audience members have clicked that button, and these are those people.
Teal Berglund, he doesn't count. You always count as a fork of your own repo, but those people, D. Graham, JEP 13, Glenn Beck, not to be confused with the American television personality
of the same name, all of those people have forked, and they have done work. Some of them have even submitted pull requests, but I'm able to see who's done this. What it means to fork is simply to have your own copy
of the repository. So, this is, and I may be mispronouncing the way you like that to be read, but Glenn Beck, instead of Teal Berglund, NDC Oslo 14, this is Glenn Beck, NDC Oslo 14, and I can't edit this. It's not my repository. It's public, but only Glenn is able to edit this,
unless he adds collaborators. So, there's a lot to this. This is how GitHub enabled open source development in the way that it did. I can have a repository, and let's say there are three people that I trust to work on that code with me. Now, that's human trust. That's expensive to create. You actually have to know human beings.
Someone you don't know, to become trusted to that person, you have to develop a relationship. That's an expensive, non-scalable thing. It involves talking, maybe having drinks together, whatever it is that you do to make friends with people. That's what you do, and that trusted group of collaborators
is a small group. I'd like a nice small group of people who own the repo that I trust, but I want anybody to be able to make changes to it and send me those changes. That's what forking accomplishes, and Glenn here had clicked on my fork button and created this copy. Now, this is his. I can't go in and edit this. Only he can. When he's done, he can send me a pull request.
I showed you a pull request inside a repo. They kind of started as a way to work across forks. And let me, it's pointing back to me here. It says, oh, this is a fork of T.L. Berglind. I can still fork, believe it or not, because I'm a member of a few different organizations on GitHub, so I can create a fork of this
that doesn't belong to T.L. Berglind. I can't fork the T.L. Berglind because that's where I am, but I could go fork to, here are some work repositories. Here are some other open source things. Dosug, that's the Denver Open Source User Group. I could go into the Denver Open Source User Group.
That's a user group I run back where I live in Denver and actually create a fork. I just did that. Now, Dosug has NDC Oslo 2014. And Dosug, people who are collaborators in the Dosug organization can now edit that thing.
There you have it. So that's forking. Now, if you think about it, forking is conceptually similar to branching. Branching is a way to split work off and have a conversation about it and have that work be tentative and then make a decision whether to merge the pull request. Forking is a way to split work off and have a conversation about it and have that work be tentative
with respect to whether you're gonna merge the pull request. They're both the same when you look at them that way. What is different? Branching is a thing that you do inside a repository when everybody is a collaborator on that repo. Everybody has rights to push to that repo. Forking is a thing you do to manage permissions and manage the asymmetry of trust.
I, as a user of an open source project, trust that project. Those collaborators don't know me from Adam. They don't trust me. To manage that, we have forking. It's a great system. It's conceptually similar to branching, but fundamentally it manages permissions,
which branching does not. Branching does not ever manage permissions. Okay. Last feature on our agenda. Let's keep things checked off. That was forking. Last thing I know I want to get to is GitHub pages.
This is cool stuff, so let's do it. Now, this read me, what do you think? That's awkward. I think I'd get some red cards if I was being rated on the read me alone. I think I would get a lot of red cards. There's not much to it. Now, I can go into that read me,
and I can put pictures in there. Let me show you. Just as a hack, this is an aside, but it's a good aside. I want to show you how I do this. I would like this read me to have an image. Just a little more spice for the repository, okay? Now, markdown gives me a syntax.
That's an image, but I need the image hosted somewhere, okay? How do I do that? Well, here's how. I'm going to blow that away. I'm going to go over here. Here's an open issue. This will work.
Oh, milestones. Yeah, thanks, milestones. Maybe, maybe. Here I am. I have an open issue. I'm going to go to my awesome library of animated GIFs, and we're going to go with the tank crushing the cars.
It seems like an American kind of thing. I don't want to post that to this issue. This is my agenda issue, and a tank crushing cars has nothing to do with my agenda. That's weird. I just needed that markdown, so I'm going to copy that. That's amazingly cute, David. No, no, I tell you what. I'm not going to settle for that.
If it's cute you want, instead of the violent and militaristic tank crushing the cars, I'm going to give you a cute dog. All I did was I dragged a picture into an image, cut it, and it's gone. It's away from the image. I was cheating. I was using that as a hack to borrow free web hosting from github.com,
and now I've done that. That image has been uploaded to their cloud hosting thing, and now that markdown is in my readme. I will commit that. What's that? Is there any sort of quota?
I think there's per upload quota of five megs. I don't think they really notice if you upload a lot of things. Maybe somebody's watching something and you get an email, but typically the way they deal with that kind of thing, if you're getting a little crazy, they'll email you and they'll say, hey, bro, what's going on? They don't shut it down.
They're more like, did you mean to do that or could you stop? There have been sort of implicit denial of service attacks by image files getting deep linked and sort of going viral, and that's happened. So be nice. But anyway, the point is, here we are.
The point is that's cute, and that is now on my project page, and it doesn't get any cuter than that. But still kind of lame as a website, and readmes can get quite elaborate. You can do a lot of good things.
Gentlemen, are we good? Okay, just making sure. I thought I had somebody calling time down there. By my clock, I have nine minutes. Do we have nine minutes? Do I have agreement on that? Outstanding, okay. I would like a web page instead of just a readme, so I'm going to go to settings here down at the bottom.
I haven't visited settings yet. That dog is so cute. And in the middle is this block called GitHub Pages. This is the free web hosting built into every GitHub repository. I'm going to use the automatic page generator. Now, if you already have a website, you're a designer, you have a designer, you play a designer on the internet, whatever it is,
you've already got web content. You don't have to go through this. I don't have any, and I'm not going to make you watch me live code HTML. So I'm just going to click on automatic page generator right there, and this gives us GitHub power tools from NDC, Oslo 2014, that's my project name.
Now, let me make that the tagline. And I can just click on that button, and my readme just got sucked in to be my front page web content. All right, good, because I still want that cute dog in there.
Let's continue to layouts. And now I get these nice professionally designed templates that are way prettier than what I'd come up with. I like midnight, but it doesn't fit the dog.
Tactile. No, guys, you know, I hate to say this, I'm going to have to go with Merlot today. That works for me. Okay, so I'm going to publish that, and it says it may take up to ten minutes to activate. It gives me this URL here. Now, let's just take a look at that URL.
Okay, it says timberglund.com slash NDC Oslo 2014. It says timberglund.com because I've got some other config in my account that maps things to that custom domain. By default, what's going to happen is, it's going to go to, so this is github.com
slash tlberglund slash NDC Oslo 2014, right? That's the name of the repository. By default, that is going to go to a site called, and I will just open a tab, and say it's going to go to a site called tlberglund.github.io slash NDC Oslo 2014.
You could see the formula. If you don't have a custom domain mapping, that is where your site is going to go, and I should be able to navigate there, and it just redirects to timberglund.com. But here you go. Here's my website. Built into my repository. Now, one last trick.
Where is that thing? And it's a website. Do I have to edit it in the browser, and edit HTML in the browser? I mean, that's a terrible way to live. Let me just do a fetch and see what I get. Okay, it's pulling some stuff down. I have a new branch called github pages.
Let me check that out. Let me do a directory listing. Now, usually when you look at a branch, it looks kind of like your project, just with some different files. Before, I had readme.markdown and poems. Now I have a website. So github pages is just that.
GitHub pages is a website built into your repository on this separate branch that's completely disconnected from the rest of your history. So github history is a graph, right? And if you never do github pages, it's a connected graph. Every commit, from any commit, you can at least navigate down to the root commit.
Once you get the gh-pages branch in there, it's now a disconnected graph, or a multi-graph, and you've got this other history, which I can go in there and edit. I can go in here and see, where's my list of things to do? There we are. Let's just say, add a little bit of markup there.
Oops, I used some slang. I'll push back to my github pages branch,
and it doesn't always refresh instantly. Sometimes there's some stuff that has to happen on the back end, but there you go. You notice that change I made to the markup locally is now reflected on the web. So if you want a nice project page that's an actual web page and not just a stylish read me with pictures in it,
you can do that. It's built in, it's for free, and you can even give the work to an actual front-end professional, unlike the guy who's standing on the platform right now who is not a front-end professional. You can give this to a web person, and they can actually just work on it like a regular site.
Even within gh-pages, branch and merge and use git to control this content. It works perfectly naturally. Then when you push work back to gh-pages, the site is updated. Now, it isn't just HTML markdown. You can put all of your web content in markdown,
and that works. There is a framework on top of markdown. I'm not going to show it to you, but I want you to remember this. A framework called Jekyll. There is a Jekyll renderer built into GitHub pages. It was built as a static blogging framework. It's possible to manage some moderately sophisticated content
using Jekyll and GitHub pages and have fragments and containers of things and things like blog posts or comments or blog posts and speaking events or whatever you might want on a personal website like that. It's all right there. You can use Jekyll to do that.
There are some great examples of Jekyll sites out in the wild. Jekyll is fairly well documented by itself and a nice thing to use inside pages. That pretty much brings us to time. Let me go back to my agenda. We'll click off that. We didn't get to rebasing. Didn't think we would.
I'm going to say we did look at pros diffing a little, but not much. I'm going to leave that as unchecked and just strike through rebasing and say this session has been shipped.
Ah, a cute raccoon. When I close this issue, I say thank you very much. Have a great day. Remember to vote on your way out. There's the cards. Throw a card in the box. Have a good one.