10 ms·
Pro Git, 2nd Edition
- fsiefken 12y agoI really liked the 1st edition, good and full featured book on Git. Does anyone know what the diff is with the 1st edition?
- TomDavey 12y agoChacon sketches the differences in the Preface. As I understand the Preface (I haven't read the new book nor compared the respective TOCs), the second edition aims to give deeper treatments of these three topics: 1. HTTP as the simplest protocol for Git network transactions 2. GitHub and the overall Git community 3. Git on MS Windows
- ben_straub 12y agoA lot. (Coauthor here.) Not every sentence was rewritten, but 4 years is a long time. There was a lot of content that was either inaccurate or out of date. We added content about two-way bridges and migration to other VCSes, graphical clients, shell integration, and lots more. There are also new chapters on GitHub and embedded Git (Libgit2 and JGit).
- lylejohnson 12y agoThis is the book that I recommend to colleagues who are learning Git. I still refer back to it on occasion when I get into tricky situations with Git. Looking forward to reading through this new edition.
- JamesSwift 12y agoI don't think you can go wrong with anything Git related by Scott Chacon. There used to be screencasts by him that were really good, quick tutorials of running through common scenarios (branching, merging, rebasing, managing your stash). I haven't been able to find them in a while. Those were really great when I was learning how to do an interactive rebase.
- rubikscube 12y agoA search for GitCasts gave some results, such as: https://www.youtube.com/playlist?list=PLttwD7NyH3omQLyVtan0CFOX_UWItX_yG https://www.youtube.com/playlist?list=PLttwD7NyH3omQLyVtan0C...
- schacon 12y agolol, gitcasts, nice! I totally forgot about these. Man, I should probably redo them, I liked that series.
- AgentME 12y agoI also recommend people to use the included "gitk" tool for visualized repository histories. It's absolutely criminal how most git tutorials never mention this tool.
- jeffreyrogers 12y agoThis book is super helpful and I referred to it in the past while I was learning Git. I want to note though that Git is pretty complex and trying to learn it all at once is going to be extremely frustrating. Instead, just start by learning the basics (push, pull, commit, clone, add, and maybe a few others). Then, when you have a specific problem that you don't know how to solve (How do I combine all these tiny commits into one substantial one?... or, I screwed everything up, how do I revert to a previously good commit?), look it up or Google for it. I still learn new things about Git this way and I think I know my way around it pretty well. It's amazing that pretty much anything I can think of Git already has implemented.
- jdreaver 12y agoI just taught git to my boss and a coworker. They both use Windows exclusively and don't touch a command line. I was able to teach them the basics (push, pull, clone, commit, status) and they learned very quickly. I told them to ignore the other commands for now, but look up how to use them when they need them. Great advice!
- japhyr 12y agoWhat's the best approach to using fit on Windows? I am comfortable with git basics on the Linux command line, and I want to teach it to students who are using Windows. Is there a windows command line version, or is there a GUI version I should start them on?
- weaksauce 12y agoSourcetree is nice and free.
- raziel2p 12y agoIf you run the default Git windows installer, it installs something called "Git bash" which is basically msys (part of mingw) with git included, which gives you command line access to git very easily. If you want to teach them the CLI way from the start, that is the way to go.
- asb 12y agoSomewhat offtopic, but I wonder why git-scm.com has still not been transferred to the Software Freedom Conservancy http://whois.domaintools.com/git-scm.com http://whois.domaintools.com/git-scm.com
- schacon 12y agoI believe I've actually offered to do this, but they haven't taken me up on it. I'm almost positive that I actually got a domain transfer code for it once but it was never transferred (I could be misremembering that though). I think this just recently came up again when there was some issue with Heroku legacy routing stuff and people seemed to think that it was better that I continue to deal with it.
- SimeVidas 12y agoWhoa. The Amazon link on that page links to the 1st edition. I almost ordered it. whev ^_^
- ben_straub 12y agoHuh, we'll have to fix that. You can find the pre-order for the 2nd edition if you search for it: http://www.amazon.com/gp/product/1484200772/ref=as_li_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=1484200772&linkCode=as2&tag=prgi-20&linkId=KRFJFRKJDOZUA6WM http://www.amazon.com/gp/product/1484200772/ref=as_li_tl?ie=...
- troydj 12y agoNoticed that the price is double the price of the 1st edition. Is that due to the number of authors doubling? ;)
- schacon 12y agoAmazon pretty much sets the price themselves here, we have nothing to do with it (nor do we get paid differently if you buy it for $50 or $20). I believe generally Amazon (or any reseller) pays Apress about $15 per book, since that's what our royalties are based off of.
- schacon 12y agoUgh, yeah, this is complex. The second edition isn't going to be properly out for probably months. While it's online now and still undergoing some copy and technical editing, I'm not sure that sending you to the Amazon page for a pre-order months down the road is the best. It's hard to say though. :(
- michaelx386 12y agoThis book just achieved the impossible and helped me understand the rebase command properly. I'm ordering the printed version as soon as it's available.
- hueving 12y agoIt's interesting how github even got its own section in this book. Poor bitbucket never gets any love. :(
- ben_straub 12y agoHonestly, the reason is size. If you're a newcomer to OSS, it's very likely that you'll end up with a GitHub user account, and much less so with BitBucket. We do mention BitBucket in the [forking workflows section](http://git-scm.com/book/en/v2/Distributed-Git-Contributing-to-a-Project#Forked-Public-Project http://git-scm.com/book/en/v2/Distributed-Git-Contributing-t...), and many of the lessons from the GitHub chapter will carry over; the two sites have a lot in common.
- deleted 12y ago[deleted]
- mhartl 12y agoGitHub is indeed the 800 lb. Git gorilla in the OSS world, so I don't doubt that your main motivation is to serve the interests of your readers, but it's probably a good idea to disclose the potential conflict of interest (namely, that Pro Git coauthor Scott Chacon was GitHub's first employee and still works there).
- schacon 12y agoI do actually cover this in the preface: https://github.com/progit/progit2/blob/master/book/preface.asc https://github.com/progit/progit2/blob/master/book/preface.a... The conflict of interest does bother me, so I did try to be as clear as I could about it and to point out at the beginning of the chapter that you could easily skip it if you don't like or don't want to use GitHub. I also stayed away from everything I could that required payment. The truth is that I've been approached to write books specifically about GitHub for several years so I thought that the demand for that sort of information was high enough to warrant moving it to it's own chapter. Had I been approached about writing about other resources I would probably have also included them. The more difficult decision was whether to include information on Gerrit. I actually started writing a section on it, then considered a chapter or appendix. The main deciding factor was how many people I thought might benefit from it.
- jokoon 12y agoI still wonder what are the advantages of git over mercurial.
- mhartl 12y agoPerhaps the main advantage is that Git has won the mindshare war vs. Mercurial, and there are benefits to using what everyone else is using. Indeed, über-hacker Eric Raymond mentioned as recently as yesterday that he supports git even though he wishes hg had won instead. [1] [1]: http://esr.ibiblio.org/?p=6476 http://esr.ibiblio.org/?p=6476
- Peaker 12y agoOut of the box support for rebase and interactive rebase. Interactive commands to stage/unstage/commit. Better underlying data format: Checking out any version in history is a cheap operation. And generally better acceptance of the tool/wider familiarity.
- rbehrends 12y ago> Out of the box support for rebase and interactive rebase. Interactive commands to stage/unstage/commit. Mercurials has those features, too, if you desire them (whether they're a good thing to have is a different argument). These features are not enabled by default because they can either lose history (rebase) or are complicated for new users (or are of dubious benefit). You're probably confused by the fact that they're called extensions. I've always argued that the term "extensions" is misleading in this case. In actual fact, the bundled extensions are modules of the core system, which are maintained and supported at the same level as "core" Mercurial. See, e.g., this discussion: http://www.selenic.com/pipermail/mercurial/2013-November/046315.html http://www.selenic.com/pipermail/mercurial/2013-November/046... > Better underlying data format: Checking out any version in history is a cheap operation. Git actually has some serious scalability problems in places and no good way to overcome them, since the storage format is hardcoded. For example: https://lists.gnu.org/archive/html/emacs-devel/2014-01/msg02015.html https://lists.gnu.org/archive/html/emacs-devel/2014-01/msg02... I can't think of any version control system where checking out any version in history isn't fundamentally a cheap operation, either. This is not a Git-specific thing.
- schacon 12y agoI'm planning to write all of this up soon, but there are a few really interesting things about the second edition. For one, everything was changed from Markdown to Asciidoc and the entire book can now be generated in multiple formats in the asciidoctor toolchain. Also, we're using O'Reilly's Atlas platform to generate amazingly high-quality PDF, ePub and Mobi versions automatically with every push to master. In every language. This is a massive improvement over the previous version. The other really interesting thing is the production process. We used GitHub and prose diffs for the entire production of the book. I think we used about 100 Pull Requests to get to where we are now. This is a massive improvement over how I collaborated with editors for the first version, the first few chapters of which were actually done by sending Word documents back and forth.
- coherentpony 12y agoIt's interesting you talked about the writing process and not the content. After reading your comment I realised that I was overlooking a huge aspect of providing this resource. As a consumer of Pro Git, all I ever see is the end result. Thank you for reminding me there are serious man hours behind this, and thank you for your time and effort and the time and effort of all the people that contributed.
- BookMaker 12y agoIs there an open source alternative to the Atlas Platform that has similar features? Thanks!
- mhartl 12y agoTake a look at Softcover (http://www.softcover.io/ http://www.softcover.io/), which is a 100% open-source ebook production toolchain used to produce the Ruby on Rails Tutorial book (among others).
- schacon 12y agoThere is a simple build process using asciidoctor-pdf and asciidoctor-epub that can also create all 3 formats locally. The Atlas ones are just a little more professional looking, but the asciidoctor chain is still really great. https://github.com/progit/progit2#how-to-generate-the-book https://github.com/progit/progit2#how-to-generate-the-book
- mate_ 12y agoThank you!
- abhididdigi 12y agoThank you!
- deevus 12y agoThe mobi file is 105MB, which is over all of my email attachment limits. Any ideas on how to send to my Kindles without uploading for each device?
- ben_straub 12y agoThe images are pretty big, so they'll look good in print and on retina screens. If you run the build locally, you could include a step that ImageMagicks them down to a more reasonable size for a Kindle.
- schacon 12y agoSo I just crushed the pngs which brings this down to 80M, but the problem is the mobi format that is produced by kindlegen. I cover the issue here: https://github.com/progit/progit2/issues/116 https://github.com/progit/progit2/issues/116 But basically Amazon produces a file with three files in it - the ePub source, the older mobi7 format and the newer k8 format. This file is meant to be uploaded to Amazon so you can download it from them. Amazon figures out what Kindle you have and sends you the correct version from this file instead of the whole 80M. It's unfortunate, but I'm not sure if I even _can_ take a single format out of the bundle. If you have a newer Kindle, you should just be able to send the ePub or PDF to it. I'm not sure if it would be a lot worse or not though, I'll try it out.
- jweather 12y agoUse the Kindle's "experimental browser" to open the .mobi file from the web somewhere.
- luckydude 12y agoI'm liking asciidoc but wondering if anyone has married it to high quality website "skins". I googled and found some websites done in asciidoc but they all look pretty basic. Has anyone done anything that looks more professional, like a marketing company did it? If it costs money that is fine.