Everything I Wish I Knew When I Started Using GitHub

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so this is the presentation I wish I had back in 2009 when I first started using github I was in university I didn't really know virgin control but my friends started telling me about github and these founders and the ruby community and all these people who just helped you out work on your programs or your applications that you're building and there's great place to go find projects to work on and if you're new to using github show of hands if you are new if you used it you signed up this year and this is your first kind of year of using github great how many people have used it over three years right same kind of a number of people who've been asked on a number of years which is good so if you're a new user welcome let us know I always accept feature requests verbally although no promises ever made sometimes I go out to dinner I go to ask on people like your you work at github cool so have you thought about this and we're like yes yes you and a million other people have told me about that and we're actively working on it or whatever it may be or actively thinking about it and if you've been here a while I welcome you to think outside the box so what I want to show today are going to be some things that maybe you've seen before but haven't really thought about it for your current workflow if you work at a company maybe think about some of these things that you can take back to them and say I saw this at a talk we should do this immediately this is a really quick thing that we can do a little lever that we can pull to immediately get some extra gain out of our workflow or something additional that allows us to use the product a little bit more interestingly different the more different things you have speaking to even just diversity in self in your workflow it's going to allow your brain to work in different ways so keep that in mind obviously back in 2009 when I was first starting using github these some of these features didn't exist but some of them actually did very shortly after 2009 and we'll talk about some of those will show some of those and this is going to be roughly in chronological order some of these are a lot older some of them are newer especially my last slide is one of the newest things and I just want to paint that picture for you especially as you see how early in the slide some of things might be they've probably been around for quite a while so I don't want to just list off features sometimes people come to a talk like this and like oh great you know I only want to hear some features that I may not know about and that's fine too but like I said think about some of these with respect to what can I do tomorrow what can I do right after this session is there something you can take away from this and not have to go write a retrospective back to your company of your boss whatever it is talking about the advantages of going to Oz Khan but what can you do immediately when you leave this room that's what I want you all to be thinking about as you're going through this what are some things that I can work on or you can work on immediately just start getting some return on this so I've been at github for a little over two and a half years I did some contracting before that I was previously on the training team now when I start telling people I'm a sales engineer they say sales is in your name you're just trying to sell me on something I'm basically doing the exact same thing I've always been doing it github I just want people who are using the product or interested in the product to know what it has and know how it can help them and I just want you to ship code faster so some of these things allow you to do that and on board your team a little bit faster and also first tip of the day when trying to find a good image for me to use of course I use my github profile picture if you go to github.com slash your username dot PNG it redirects you to the actual profile picture for you to grab so first tip of the day if you need to grab a good profile picture easily just add dot PNG to the end of your profile URL so let's get into it right we've been talking especially at OSCON it felt really really good yesterday that we need to do open source and the talk yesterday I can remember was talking about what the title was that the keynote but talking about the the speed of open source and talking about the the sound barrier and being ahead of the game and so that that's a good reason for using open source you want to contribute to open source to stay faster to stay more relevant with new technologies that are coming out but these these types of workflows using open source and getting used to that is new for a lot of companies so there's a you know a couple quick reasons we'd want to use this we kind of have it work if we're a company that's using an open source project and if we put people on that project to work on it you are starting to control or at least have a vested interest in your own destiny so there's no way that we at github can ever say well we can't do that because of a limitation and get we employed two members on the court get team so anything that we actually want we can start talking to the community more directly with or when we built Rescue which is a a ruby back-end delayed job system we could say well this is the way we use it how are other people using it we want we want the open-source community to contribute with us but they can say this is the way we use it here are some efficiencies we have and we need to fix some things and I've seen this down the road with Redis which is what rescue is built on had some efficiency problems with it and someone send a pull request even a couple months ago to fix that and it's an active project as well as an individual contributor you can show that you're going above and beyond the call of duty so you have your day job and that's very difficult you come home at five o'clock or six or seven or eight whatever it may be and you may be a little burned out but if you do start pushing the bounds on your own limitation in your own skills you can become a better developer whether you work in Python at work or net and then you want to practice with NGO or Haskell or whatever it may be you're going to expand the your brain's capacity to actually solve problems so working with open source when you have 20 million repositories to look at is a pretty powerful thing and then lastly you don't need to hire people to continuously work on just one project once it's open source once you've open sourced a project now you have a task force of a bunch of other people to help you with that project and in fact you also kind of have a candidate pool to pull from as well so that's an interesting thought to think about so let's let's get into this kind of first feature here how many people knew that github was the largest subversion hosting on the planet a few people this is actually this is accurate I want to thank our co-founder Scott Chacon for releasing this feature on April 1st or April Fool's Day the maybe a week later a couple days later it's I know it's a little blurry of a screenshot here and there is a demo I'm not actually going to be relying on Wi-Fi for any of my work today because that would be terrible it actually works he says at the bottom of this blog post and then there's another blog post that are another update from us talking more about this and as a trainer and as a teacher we often have people who say well we're moving over from subversion we need to migrate all of our things and it's really hard to convince people and I say well you can just say SVN check out and then the URL and it it brings it down to their laptop and they can work on it or SVN check in and that will work as well it's their actual gate repository actual SVN repositories so let's let's take a look at this so just SVN check out and then a project that I had fort on my end and as I CD into that project we can see here on the bottom of the screen I have a dot SVN folder I've my branch's folder I'd actually don't know too many workflows with SVN but I have my trunk folder my branches my SVN I have all the history of all of that entire project on my machine so if we're coming over from SVN and we have some people working with us who don't necessarily want to use git right away they can use SVN that's a step in the right direction past that you maybe you want to use the git SVN bridge which allows people to kind of use a mix of the commands to interact with github and then eventually maybe with some training or teaching online materials they can start using git itself and not just SVN all right so the next thing is a URL shortener get dot IO is actually a thing that we have to do a URL shortener so if it's a github URL and you wanted to share that URL and I think you're the URL structure is pretty good it's github.com slash a user organization slash a project name but depending on capitols and language barriers it's sometimes easier just to give someone a short URL get that IO slash in about seven digits so if you use Ruby you can actually install this onto your command line right away by saying gem install get IO and start shrinking your URLs immediately which that's actually running get i/o ring and then that project it gives me that little URL I could have typed that onto PB copy so it was on my keyboard open that up and it directs me right to my repository so if you're sharing stuff internally at a very large organization or a very large open source project you want to pass these things around sometimes that URL is a little bit better especially if you were going to tweet it maybe you have character constrictions that kind of stuff dot patch at the end of a pull request so a lot of people have different workflows when working with pull requests but if you go over to a pull request and you add dot patch to the end of that what that does is the same git command under the covers as get format - - patch and you give it a range of commits so what format - patch is originally for is for formulating a number of patches to make your feature that are useful to put into mail because that's how git core actually works you have to send stuff into the mailing list they see the patches and then one of the core contributors grabs them and puts them in to get core for you so that patch if you still wanted to work with pull requests but wanted to contribute to a project like git core who didn't accept pull requests you could you could formulate your patches that way maybe you have a bot or some automated system that goes out to the URL to actually grab that one side note about curling the URL for your pull request you are gonna have to use the - uppercase L to follow the redirect because we we redirect that off to another front-end server it's a format I can't actually read the slide but it's a patch diff that github user content com etc so patches if you have a specific workflow and you want to work with patches but not really have to do them in the pull request you can you can work with them this this is one of my favorite sections because as I teach people and we teach them about pull requests and workflows they often think well I'm working with open source I need to go out to that project I can't push to that project so I need to fork it if you're not familiar with forking the analogy I use in class is it's like going to the library finding a book that you want your own copy of the book to live at the library you take that book you go over to the photocopier you copy every single page out of it you rebind it you put it back on the shelf that's like github as the library it's hosting that book for you and do you want your own specific copy of that book that you can edit so that's what your fork is here but when you start forking repositories you don't always have to just send the pull request back to the original maintainer you can send them to a co-worker maybe you and and she can start working on this feature and then when you're all done with it then you send it back to the upstream repository or you just want to send it to yourself that's also something people forget is even though I'm working on a fork I can send this pull request right back to myself because all pull requests care about our branches with two different series of commits so as long as the commit hashes are different a pull request is open and available to work on so let's take a look about this quickly here I have to apologize for a little bit of the rendering here but what I'm doing is out on that training utils project I'm creating a new branch so I can do this feature work and the welcome message here on this this small script is not necessarily very friendly just says enter instructor name it's kind of robotic to me so I say well why don't we just make it what is the instructor name so ask for a little bit more info write a proper commit message here and commit our changes to our branch now when I go back it asked me to send a pull request and by default a fork is going to send you a send the pull request back to that parent repository in this case the github training or user on github but as you saw there I can change those dropdowns to change the base repository that I'm sending it to I can change the branches if I wanted to send this to my coworker Joshua Weiner I could send it to him to sees also forked this repository what we call the repository Network and you can view this if you click the the number next to the fork icon in the upper right hand corner now if you go to a big project like bootstrap which has over 38,000 Forks it's not going to generate a repository list for you or a repository network list for you because it's way too much so I was able to send myself a pull request here actually confused a couple co-workers with this recently so which is say what you will about that for the longest time I get github has been able to close issues and pull requests from the command line it's more specifically in the commit message so when you're in the commit message if maybe your workflow doesn't involve clicking the merge button from a pull request but it involves you merging manually and pushing up the master now that'll that'll if the commits are the same that'll close out the pull request because it'll see that yes you close this pull request from a given commit but what about when you use issues for task list which I'll be showing here just a bit or you use issues for some lightweight project management when you close your pull requests or when you're merging your pull requests I should say you want to make sure that your issue is closed as well you don't want to do any extra work and if you start typing the pound symbol or the hash tag and then some numbers or some titles you'll see the list of other issues and pull requests in there so you want to kind of close out this full software development lifecycle process so we we have an issue here so this is issue number two and this just says the the Welcome script needs to be a little bit friendlier we know we have a pull request open for this we just sent it to ourselves so to kind of close both these things out at once not only the feature work but the issue as well when we're typing in that merge box we can autocomplete just like we would in any comment box on github so that's fine I just I merge that in delete my branch cognitive clutter as some people call that and then I go over to my issue and we see it's already closed in fact it says it was closed by a given it that's that merge commit from that pull request so I don't have to go into this this work I don't have to go into the issue I know it's automatically closed because I mean using a specific keyword when I emerge that I say closes closed closed singular fixed fixed fixes to merge those pull requests our merge closed those issues from a pull request and also we see it in the commit message as well how many people use gist on a given day real quick way to do a to do list as I maybe I do one three and six month of goals for me just that work or an open source I usually maintain those in a single gist to private gist as it is or maybe you have a to-do list of what you're going to do that day but then it just as well that's all really great but what else can you do with just well they they appear get back to you see on the tab on the right-hand side that there is a revision number which is kind of different forget versus subversion which has revision numbers but they're fully full get projects they have branches you're not going to see them in the UI they don't have pull requests they don't have issues but they do have branches and they have multi files as well a lot of don't actually use the multi file too often but there are multiple files so let's take a look at what this is so I have a project up on the gist right now go I'll generate random changes so as I'm going through classes I need to say all right I need to make five commits with a ruby of Ruby testing whatever it is just to generate some commits to practice so I can grab that URL and then over in my terminal clone that down named it something 'rememorable because you don't want to just have it just URL as your as your folder name change into that and I can just immediately start making some changes so here I'm actually just going to make a commit on the command line add a readme to this and then push that up to the server as well and so any gist itself if you're involved in Ruby or any other libraries that you're making or any other version or any other programming languages that have good libor raise like ruby does in its gems you can actually point a gem or a library to adjust because it is a full git repository which gems can actually use so I made my commit I said add commit I'm always going to try to teach people how to commit and write commit messages properly regardless of how far away from training I get and then we can see up at the top there's an actual markdown file just like we would expect on github.com to be rendered out for us so very useful blame blame is such a cool git command although it sounds like as a negative connotation and maybe Linus originally attended for it to be a negative command you are necess and saying who changed this line most recently so you say git blame and then a file name and it'll list out the contents of that file and each line along the way it will say the most recent person who edited that line you can have it follow to find out the history if there's renames all that stuff that's great but I don't always want to type that on the command line it's a little hard to find those you find the commits then you say it show that commit maybe follow the rabbit rabbit hole that way I like doing this on the web so any project like the backup utility have here for backing up your Enterprise instance you can go into the project here find a file like GOG back up and say blame this is one of our longer projects that we've had for a giddup enterprise the last couple of months C commits from 2014 July August we see one from January seventh but there's also one here about enable maintenance mode so let's go ahead and click that commit and we can actually see not only when that line was last edited but on on that screen we saw that it was a that commit was brought in from a pull request pull request number nine which of course just like every other pull request has a conversation view the files changed you can see the discussion around how that commit even made it in and what other changes came in with that commit not maybe not just in ghe backup a lot of times when developers at github need to find the reason why certain changes were made to our core they'll do this exact same workflow they don't they don't do it on the command line they do it get blame in the files itself so we just like any other pull request we can see these changes how many people want to bend Baltar's talk yesterday he was talking about the number of licenses on open-source projects on github and it was upsetting lilo anyone see the keynote yesterday talking about licenses or the Ignite talk rather talk about licenses there's a large number of people who don't have licenses on their projects a lot of people myself included I'm very guilty of this don't go to my projects and yell at me for this if you do see me without licenses send me a pull request you get an extra little star in a contribution graph a project on github is not actually open-source truly until it has a license yes it's there yes you can view it but there is no legal mention of how you can use that project if you include a project in your open-source work at work that doesn't have a license you should immediately go send them a pull request for any license and we have a few of them that you can choose from so here we have an example of my friend Brent Jackson not Brent beer Brent Jackson yes his website Jackson black github that I Oh it's a pages size just his website but it doesn't have a license so I create a branch I go to add a new file and here's the important part adding a new file on the web view makes adding a license easy I type the word license and it pops open a template for me if I want MIT or maybe I don't know the name of the license I can start typing it there's MIT and it drops it in for me it's not really mine so I want to say Brent Jackson not Brent beer let's go down to the bottom do a proper commit message and send up a pull request I'm not sure if GPL I'm not sure if GPL threes there we default to some in the very beginning as the most suggested these are all pulled from a project called choose a licensed org - I know we have GPL - I'm not sure off the top of my head if we have GPL three but there's discussion I'm sure around GPL three and other popular licenses also sorry it's at the bottom of the screen when you go to a pull request and you're sending a pull request to someone if you're unfamiliar or you're a little worried about one particular change you can comment on that specific line of that pull request not not on the conversation tab you can go to the particular line and say hey I think this change is maybe what I wanted to add let me know this isn't what you were thinking or you know does he want his github username here as a copyright side of his actual first and last name I'm not sure and these line level comments are brought back into the conversation view - so they're not lost anywhere all conversation on a pull request or on a commit that's involved in a pull request is always brought back to that conversation tab so a lot of times making mistakes is pretty easy with with coding I don't want to say with git but with coding in general and sometimes you submit a change you have pull requests you have code review we have people who've said it looked good they've commented they're responsible with you then it goes into production and suddenly some some errors start escalating it's not terrible it's at the end of the world but you know what let's go ahead and undo that pull request or maybe accidently merged it without any review so I want to pull that code out before someone can actually review it and comment on it appropriately so the example that I did earlier where as I submitted a full request to myself I had no one give me review on it I just said yep this is great it's a better welcome message let me just merge this change so I can go back into that merge pull request that I had earlier and there's actually a button for this called revert shockingly and what that will do is it'll open a whole new pull request for doing the exact same thing the revert operation on the command line would do the only difference here is that when you open a pull request for something you have a URL as Matthew mentioned at the keynotes yesterday we have a co-worker Matt Matthew McCullough mention of the keynotes we have a co-worker Ben Balter who also did the license talk yesterday if you like it put a URL on it you know don't put a ring on it put a URL on it and URLs are forever butts the other thing it's really important to think about here as we have these projects that we're working on and we have these pull requests remember that those those pull requests are URLs that you can always go to some new person can come to later they can see the motivation behind that pull request why did this happen we actually saw this when I looked at backup utils with that blame command are that blame view I can see the full conversation did the changes they made on this so as you're reverting your pull request or you say well I don't want people to think that I made a mistake what's wrong with that what's wrong with make mistakes be proud of your mistakes and show the new people the way that they should probably prop properly accept their own mistakes because when we have mistakes we learn from it so as this URL is here we actually saw at the top of the screen the branch name is automatically created for us so it's a nice nice kind of automation there as well tracking issues are really cool so some people always people talk to me and say when's get up going to have more project management features when's when's github going to going to add something that does more control over my repository and the features I'm working on well we have the thing called tracking a task list rather and we often put those in tracking issues so within the training team specifically we'll open an issue for every event that we're going to go to and to make sure everything's lined up and ready for that in-person event we'll have a bunch of task list which are just written in markdown so it's a - and then - square brackets of all the things that we actually need to do so it's kind of our go no-go flightcheck so inside of a given issue if I was going to open it up I'd maybe say it's going to be a tracking issue and write some things in there and mention the motivation behind this and I went ahead and spent this up a little bit so we didn't have to just sit here and pretend I'm typing and doing all this work the important part is that you put this task list in the opening post or the original post of an issue so we see that syntax it's a - two square brackets separated by a space and then some text describing what the what the to-do item is so I go ahead and I open this and if you want to mark one is closed right away you can just put an X instead of a space there but for me I like clicking check check boxes so immediately I check that and we see that because it's in the opening post back on the just a roll list of all of our issues or pull requests it works the same way there we can see how many items are maybe left to be worked on within this project so if you have a big project and you wanted to break it up and break it into subtasks of sub issues or additional features and you wanted to someone have someone later come back to this and say how did you make that new feature in fact if you've seen our blog post recently talking about direct or membership which is an early access program there was many many many many tasks list items talking about the way we're doing this we'd send out user research studies for people to do them and we tracked all of those in issues and in pull requests to see how complete a feature actually is we use this every single day no I simply added tracking to the top of that because as I scroll through a list it's easy for me to see and also when email comes through to my gmail I could set up a custom filter for that so in the title there's no magic there also I've seen people create labels labels is a really good one - just because it's color and it actually stands out you could say green is a tracking issue oranges maybe to do items left or red is needs review stuff like that also if anyone else does have any questions there will be time afterwards but if you have quick questions by all means please ask them I will cut you off and tell you to hold onto it or write it down if they get ends up getting too long rendering non-code files on github is awesome I love bringing as many people into my project as possible and this is important to when you're trying to get github adopted at your company or if you're just new starting out with github and you want to get an exposure into what this is if you're giving a talk on design and you're trying to get more designers using github which there actually is a concurrent talk right now from another attendee giving a talk about using more having more designers use github this is a really good way to start have them drop images into get up for Mac or get up for Windows and upload those to github if you have large files we have git LFS now so you can kind of store those off to the side still view them on still view things like images geo JSON files if you're not familiar with geo JSON it's essentially a map of coordinate points and we render that using a product called map box in the web so you can actually see that but also the images are difficult you have one version of the image and another how did they change you can view that diff on github you can view the diff of a map on github you can view a 3d file like this one on github so as you're doing 3d printing like so many people are kind of experimenting with and practicing with you can actually see these STL files and how they'd look before you print them if you're submitting pull request to someone they could say well you've edited my 3d file but I don't know what you've changed you can view the diff of the files as well sagen no video sorry very large yeah yeah so this before I start the the demo here this is a a gear and this is a 3d printer project from some user he received a pull request hit STL's small gear I don't know the project or the type of project he's working on here but there was a gear and it needed to be changed the the way that some of the rendering of it maybe was wrong and they needed to rotate some of the actual teeth on it a little bit whatever it may be so let's take a look at this so you can see it just renders the raw file here you have two different types of revisions on the bottom the highlighting or the revision slider so I can say oldest oldest on that side newest to this side you can zoom in change your perspective see how that's actually changing a little bit better there and then maybe switch back over to highlight and say okay they've kind of rotated the teeth here and we saw that the new that part in the middle changed but also PDFs that's what this is and this is just a PDF being rendered out on github now as you have projects maybe you're collaborating with non code contributors and they have some some code that they're working on or some project that they're working on this one's actually from NASA talking about 3d printing and some of those stuff that they do there are 3d models that they do there in this case it's a 2d model that they dropped their PDF into their project so anyone browsing the code looking at the 3d models and coming over to the PDF can actually click into that and we will render it for you so you don't have to download that PDF to actually view it you can render it and view it right in github as well so those of you who were new using it up in the last year are you all subscribed to the newsletter so knows some yeses there's a newsletter that you can get on a daily weekly bi-weekly and monthly scale based on the types of projects that are trending things that have starred been starred and followed by github staff the things that have been started followed by you and your friends so you get an update about this in an email at a frequency multiple frequencies as you so choose to I believe it's day we'll see here in a minute but day week and month now some people might say well we don't use github calm and but we use get up Enterprise has this useful why is you have a multi thousand person company using github Enterprise do you know everything everyone's working on probably not but receiving an email notification about some popular projects that your coworkers are saying other co-workers work on is just like creating your own tiny github within your company so this newsletter and the Explorer feature is very very nice so our explore feature defaults to some showcases that we've we've selected but as you're on just this page you can scroll down and see essentially what this this page will contain trending repositories this week starred by people you follow this week and then at the very bottom those I'll learn more for the newsletter which if you're interested is just explore slash subscribe so there's an example of what that would look like on a given day to see what kind of projects you'd receive notifications about I receive one every day and I'm actively trying to find more and more people on github to follow just some more people you follow that are interesting doing cool things and that are interested in other projects the better your your newsletter your daily daily hub maybe you could call it is going to be to find out what's happening around github or what's happening within your your organization so it's a great way to stay in tune and in touch with the type of work that's being done around you and finding out about project that you maybe didn't know about maybe before someone posts it to hacker news or reddit or whatever it is this is a kind of a newer feature the URL existed for this for a while but we've changed this up to be a lot more predominant in that the top of every github page now there's two additional there's two links that are there that were previously not there just says pull requests and issues you can always click those because they're at the top of the bar now on github if anything's at the top of the window and that in that header that means it's global if you click on your notifications when you're the inside of a repository and you're looking at that repository and click on your web notifications it's going to take you to the web notifications about that project if you're just on the dashboard are you viewing your profile someone else's profile where you just opened up a random page and said oh man I know I have a bunch of work to do that's maybe outstanding that I need to work on you can go to github.com slash pulls or issues and that'll be your global list of all pull requests and issues by default that you've created now as we'll see here I'm signed in as the github student there is created assigned and involves or mentions in that as buttons in that upper left-hand corner now before I start the video created is obviously pull requests or issues that I've created and mentioned is ones where someone has brought me into the conversation so maybe those are ones that I missed the email notification or web notification about but I'm involved in some way and someone has tried to bring you into the conversation to get me to actually do the work and I forgot so it's always good to kind of use this as your to-do list as you're working on multiple projects within multiple open-source organizations you can come here and actually change the organization drop-down to narrow it down to those different organizations so we're all lists of stuff to get up student hasn't done in too long so I can say well let's go over to the github school specific organization and only things that I mentioned on but not created alright so there's a more cleanup that the I opened but then the github teacher commented back to me so a good way to find some of those issues or pull requests that you maybe have forgotten about so that's one of the newer features and kind of last but certainly not least there's a couple things that I had actually cut out of this so many things to continuously talk about is Adam even at our booth in in the expo hall people say oh did github create Adam we did it's one of the longest projects we've ever had at github our founder Chris Chris watch out there were defunct started working on Adam about six or seven years ago and it's gone through many iterations since only being released last year but we think it's at a really good point that's why I released it and we open sourced it completely so you can go to github.com slash Adam slash Adam to start contributing to it directly and Adam also has a very very large ecosystem of other projects and packages so if you say well I don't use Adam because I'm using sublime well why are using sublime is there something in Adam that maybe you could contribute to do contribute back to open source to make the project better the code that actually runs adam or the platform that adam is actually built on we've changed the name of and it's always been open source called electron electron dot adam dot io is i think one of the coolest things that we've ever worked on what electron does is allow you to build desktop clients for any operating system using the same technology you'd use to write a webpage think about that for a minute i don't have to know how C sharp works I don't have to know how to write net I just write an HTML Javascript and CSS some JSON work through those projects and then I'll have a desktop client for any user to use that's in fact Linux Windows Mac and ARM processors so if you have a Chromebook you could make a desktop client for it as well so Adams pretty cool I like Adam because of that but it's also just a fun text editor so let's let's take a look at a little bit of Adam itself so I had that generate random changes project and I want to do some additional work on it now one thing I'm going to preface all of us with is merge conflicts I'm going to work on a merge conflict here and we're going to see how Adam makes that reveal for me now how many people hate merge conflicts didn't get this number of you not raising your hands and I know you don't like them how many people solve them manually going into the file just removing the merge markers and how many people use a external client to do this whether the one that ships with Mac or Windows or anything like that so a number of them some of them are paid I've used a couple but none of them have been as good as the one I'm about to show you especially because it was free and I could hack on it anytime I wanted to so um in that gist or well I'm working on that repository locally I'm going to create a branch here to just update the readme and the script comment in the script file because what I'm going to do is as I've done in classes is generate a merge conflict so we have this line here line number three I'm going to change it to say something different but I'm saying the same thing and then the readme let's change the top line as well so I'm doing this as feature work now this is going to be the exact same as if you and a colleague we're trying to race to get something into production and they beat you to it and then when you merge you pull down you generate a conflict that's essentially what I'm simulating here so on that feature branch I'm committing for demo purposes I'm mentioning this was done on a future branch and now let's switch back to master and do essentially the same amount of work kind of simulating this merge conflict so instead of number of arguments I say call it quantity of arguments and I edited the readme to say ah Scott us so let's go ahead and add and commit those and then the next step I'll do is actually just merge this from the command line so this is kind of synonymous with you're working on a feature branch with someone and you pull the change down if you curious about all this I can of course share steps to do this and recreate this if you want to practice afterwards so I generated the merge conflict now here's the way it normally looks you have those merge markers what's in head and what was pulled in but then we have this package which of course needs updated that's going to highlight this for us because all this is is HTML CSS and JavaScript and so it's putting CSS wrappers around the conflicts removing the merge mark for us and I can say okay you know what I've edited that and it looks good let me see I'm sorry it's in the lower right hand corner Adam will and we'll see in a minute - and I show the maintainer demo there's a list of all files that have conflicts currently so I picked one of the choices there instead of editing now we can see both of those get diff - stage not get discus it's in the staging area so we can see the changes that are about to be merged in and when we have a conflict we don't want to just do git commit dash em and write something we actually as status will show us just say git commit to open up our default text editor which for me is Adam so the default message looks good save and quit and when we're all done with that we can say git status again and see that we're ahead by three commits now that package itself doesn't come by default on Adam but it's free that it's on github for you to look at in fact when you install the package you can click in and read about it yourself there's custom key bindings for this package to allow you to detect conflicts select a certain conflict as you want to and then there's the readme because this is what's hosted on github to show this work as well so animated gifts a huge fan of as well so this number features how to contribute to it if there's a package you don't like you could fork it make your own package bring that in for your company and work on it that way that's the part that I love about Adam there's a million one not a million literally billion but aha there's hundreds of packages out there for us to contribute and work on that we can add to our own our own workflows and our own text editors if you know everyone is doing things in a certain way you can actually make the workflow for them a little bit easier by writing your own atom package and making it easier for them amazing work so I hope you enjoyed that even slightly extended version of the talk as we started early but I hope the thing that we take away from this is not ok that was great I'll go work on that maybe next week when I get done with the conference I've all these emails I got to get back to and I have so much work that's piling up but I don't want you to think what am I going to do in a week what am I going to do tomorrow because I'm busy today I want you to think what am I going to do today weird am I going to do immediately walking out of this room because you have a 10-minute break you should all do this open up your laptops okay if you have to wait in here send a pull request to yourself create that license file get to work on that and start making changes to your workflows and and the ways you use the product today thank you
Info
Channel: GitHub
Views: 57,882
Rating: 4.7915311 out of 5
Keywords: git, github, basics, collaboration, git basics, versioncontrol, version control, open source, octocat
Id: KDUtjZHIx44
Channel Id: undefined
Length: 43min 21sec (2601 seconds)
Published: Thu Aug 13 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.