Top Related Projects
The git-scm.com website. Note that this repository is only for the website; issues with git itself should go to https://git-scm.com/community.
Most commonly used git tips and tricks.
A collection of useful .gitignore templates
Quick Overview
ProGit2 is the second edition of the Pro Git book, written by Scott Chacon and Ben Straub. It's an open-source, comprehensive guide to Git version control system, covering everything from basic concepts to advanced techniques. The repository contains the source files for the book in multiple languages.
Pros
- Comprehensive and in-depth coverage of Git
- Available in multiple languages, making it accessible to a global audience
- Regularly updated to include new Git features and best practices
- Free and open-source, allowing community contributions and improvements
Cons
- May be overwhelming for absolute beginners due to its depth
- Some translations might lag behind the English version in terms of updates
- Requires familiarity with AsciiDoc format for contributors
- Large repository size due to multiple language versions
Getting Started
To contribute to the ProGit2 book or build it locally:
-
Clone the repository:
git clone https://github.com/progit/progit2.git
-
Install Asciidoctor:
gem install asciidoctor
-
Build the book:
cd progit2 make
-
Open the generated
progit.html
file in your browser to view the book.
To contribute translations or improvements, fork the repository, make your changes, and submit a pull request following the guidelines in the CONTRIBUTING.md file.
Competitor Comparisons
The git-scm.com website. Note that this repository is only for the website; issues with git itself should go to https://git-scm.com/community.
Pros of git-scm.com
- Serves as the official website for Git, providing comprehensive and up-to-date documentation
- Offers a user-friendly interface for browsing Git documentation and resources
- Includes an interactive "Try Git" feature for hands-on learning
Cons of git-scm.com
- Limited to web-based content, not easily accessible offline
- May not cover advanced topics as extensively as progit2
- Updates may be less frequent compared to community-driven progit2
Code Comparison
git-scm.com (Ruby on Rails):
def book
@book ||= Book.includes(sections: :chapters).find_by(code: params[:lang])
raise ActiveRecord::RecordNotFound unless @book
@book
end
progit2 (AsciiDoc):
[source,console]
----
$ git clone https://github.com/libgit2/libgit2
$ cd libgit2
$ mkdir build && cd build
$ cmake ..
$ make
$ make install
----
The code snippets highlight the different focus of each repository. git-scm.com contains Ruby code for managing the website, while progit2 includes AsciiDoc markup for creating the Pro Git book content.
Most commonly used git tips and tricks.
Pros of tips
- Concise and focused on practical Git commands and tips
- Easy to search and find specific solutions quickly
- Regularly updated with community contributions
Cons of tips
- Lacks in-depth explanations and context for Git concepts
- May not cover advanced topics or Git internals comprehensively
- Limited narrative structure, making it less suitable for beginners
Code comparison
tips:
git config --global alias.unstage 'reset HEAD --'
git config --global alias.last 'log -1 HEAD'
git config --global alias.br 'branch --format="%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]" --sort=-committerdate'
progit2:
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
$ git config --global core.editor emacs
$ git config --list
Summary
tips is a collection of practical Git commands and tips, ideal for quick reference and problem-solving. progit2 is a comprehensive book on Git, offering in-depth explanations and covering a wide range of topics. tips excels in providing concise solutions, while progit2 offers a more structured learning experience for Git users of all levels.
A collection of useful .gitignore templates
Pros of gitignore
- Extensive collection of gitignore templates for various languages and frameworks
- Regularly updated with community contributions
- Simple and straightforward structure, easy to use and implement
Cons of gitignore
- Limited to gitignore files, doesn't provide comprehensive Git documentation
- Lacks explanations or context for the ignore patterns
- May require additional research to understand specific ignore rules
Code comparison
gitignore (Python.gitignore):
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
progit2 (book/01-introduction/sections/first-time-setup.asc):
[source,console]
----
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
----
The gitignore repository focuses on providing ready-to-use .gitignore files, while progit2 offers comprehensive Git documentation in AsciiDoc format. gitignore is more practical for quick implementation, whereas progit2 is better suited for in-depth learning about Git. The code examples reflect their different purposes: gitignore contains ignore patterns, while progit2 includes Git command examples with explanations.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
= Pro Git, Second Edition
Welcome to the second edition of the Pro Git book.
You can find this book online at: https://git-scm.com/book
Like the first edition, the second edition of Pro Git is open source under a Creative Commons license.
A couple of things have changed since open sourcing the first edition. For one, we've moved from Markdown to the amazing AsciiDoc format for the text of the book; here's an https://docs.asciidoctor.org/asciidoc/latest/syntax-quick-reference/[AsciiDoc quick reference].
We've also moved to keeping the translations in separate repositories rather than subdirectories of the English repository. See link:TRANSLATING.md[the translating document] for more information.
== How To Generate the Book
You can generate the e-book files manually with Asciidoctor. If you run the following you may actually get HTML, Epub, Mobi and PDF output files:
$ bundle install $ bundle exec rake book:build Converting to HTML... -- HTML output at progit.html Converting to EPub... -- Epub output at progit.epub Converting to Mobi (kf8)... -- Mobi output at progit.mobi Converting to PDF... -- PDF output at progit.pdf
You can generate just one of the supported formats (HTML, EPUB, mobi, or PDF). Use one of the following commands:
To generate the HTML book:
$ bundle exec rake book:build_html
To generate the EPUB book:
$ bundle exec rake book:build_epub
To generate the mobi book:
$ bundle exec rake book:build_mobi
To generate the PDF book:
$ bundle exec rake book:build_pdf
== Signaling an Issue
Before signaling an issue, please check that there isn't already a similar one in the bug tracking system.
Also, if this issue has been spotted on the git-scm.com site, please cross-check that it is still present in this repo. The issue may have already been corrected, but the changes have not been deployed yet.
== Contributing
If you'd like to help out by making a change, take a look at the link:CONTRIBUTING.md[contributor's guide].
Top Related Projects
The git-scm.com website. Note that this repository is only for the website; issues with git itself should go to https://git-scm.com/community.
Most commonly used git tips and tricks.
A collection of useful .gitignore templates
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot