git-scm.com
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.
Top Related Projects
Pro Git 2nd Edition
A collection of useful .gitignore templates
Git extension for versioning large files
Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
A cross-platform, linkable library implementation of Git that you can use in your application.
A simple version control system built on top of Git
Quick Overview
Git-scm.com is the official website for the Git version control system. This repository contains the source code and content for the website, which serves as a comprehensive resource for Git documentation, tutorials, and community information.
Pros
- Centralized source for official Git documentation and learning resources
- Open-source project allowing community contributions and improvements
- Regularly updated with the latest Git information and features
- Provides a user-friendly interface for accessing Git documentation
Cons
- May require technical knowledge to contribute effectively
- Updates to the website can be slower compared to other Git resources
- Limited interactive features compared to some third-party Git learning platforms
- Navigation can be overwhelming for beginners due to the extensive content
Getting Started
To contribute to the git-scm.com website:
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/your-username/git-scm.com.git
- Install dependencies:
cd git-scm.com bundle install
- Run the local server:
bundle exec rake preview
- Make changes and submit a pull request
Note: This is not a code library, so code examples are not applicable.
Competitor Comparisons
Pro Git 2nd Edition
Pros of progit2
- More comprehensive and in-depth content on Git
- Available in multiple languages and formats (PDF, EPUB, MOBI)
- Community-driven with frequent updates and contributions
Cons of progit2
- Less user-friendly interface for online reading
- Lacks integrated search functionality
- May be overwhelming for beginners due to its extensive content
Code Comparison
git-scm.com (Ruby):
def page_title
if @page && @page.title
"#{@page.title} - Git"
else
"Git"
end
end
progit2 (AsciiDoc):
= Pro Git
Scott Chacon; Ben Straub
:doctype: book
:docinfo:
:toc:
:toclevels: 2
:pagenums:
:front-cover-image: image:book/cover.png[width=1050,height=1600]
Both repositories serve different purposes. git-scm.com is the official Git website, offering a clean interface for documentation and downloads. progit2 is the source for the Pro Git book, providing more extensive Git knowledge. While git-scm.com is better for quick reference and official information, progit2 offers a deeper dive into Git concepts and practices.
A collection of useful .gitignore templates
Pros of gitignore
- Extensive collection of gitignore templates for various languages and frameworks
- Community-driven with frequent updates and contributions
- Simple and focused repository structure
Cons of gitignore
- Limited to gitignore files only, lacking broader Git documentation
- No website or user interface for easy browsing of templates
- Less comprehensive Git-related resources compared to git-scm.com
Code Comparison
git-scm.com (Ruby):
def link_tag(name, url)
%Q(<a href="#{url}">#{name}</a>)
end
gitignore (gitignore template):
# Node.js
node_modules/
npm-debug.log
yarn-error.log
While git-scm.com focuses on providing a comprehensive Git resource website with documentation and tutorials, gitignore is a specialized repository for .gitignore templates. git-scm.com offers a broader range of Git-related content and a user-friendly website, whereas gitignore excels in providing up-to-date and community-maintained gitignore files for various programming languages and environments. The code comparison highlights the different purposes of these repositories, with git-scm.com containing website-related code and gitignore featuring actual gitignore file contents.
Git extension for versioning large files
Pros of git-lfs
- Specialized for handling large files in Git repositories
- Provides efficient storage and transfer of large assets
- Integrates seamlessly with existing Git workflows
Cons of git-lfs
- Limited to managing large files only, not a full Git implementation
- Requires additional setup and configuration
- May have compatibility issues with some Git hosting services
Code Comparison
git-scm.com (Ruby):
def page_title
if @page && @page.title
"#{@page.title} - Git"
else
"Git"
end
end
git-lfs (Go):
func NewDownloadCheckoutTask(
*tq.Manifest, string, string, int64, bool,
) (*tq.Transfer, *tq.Transfer, error) {
// Implementation details
}
The git-scm.com repository is primarily focused on the Git website and documentation, using Ruby for web development. In contrast, git-lfs is a Git extension written in Go, designed specifically for managing large files within Git repositories. While git-scm.com serves as an informational resource, git-lfs provides practical functionality for Git users dealing with large assets in their projects.
Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
Pros of GitExtensions
- Provides a user-friendly GUI for Git operations, making it easier for beginners
- Offers integration with Windows Explorer and Visual Studio
- Includes built-in merge and diff tools
Cons of GitExtensions
- Limited to Windows platform, unlike git-scm.com which is platform-agnostic
- May have a steeper learning curve for users already familiar with command-line Git
- Less frequently updated compared to git-scm.com
Code Comparison
GitExtensions (C#):
public static string GetGitDirectory(string path)
{
if (string.IsNullOrEmpty(path))
return "";
if (!Path.IsPathRooted(path))
path = Path.GetFullPath(path);
do
{
if (Directory.Exists(Path.Combine(path, ".git")))
return path;
path = Path.GetDirectoryName(path);
} while (!string.IsNullOrEmpty(path));
return "";
}
git-scm.com (Ruby):
def page_title(page_attr = nil)
if page_attr
page_attr
elsif @page && @page.title
@page.title
else
"Git"
end
A cross-platform, linkable library implementation of Git that you can use in your application.
Pros of libgit2
- Cross-platform C library for Git operations
- Designed for embedding in other applications
- High performance and thread-safe
Cons of libgit2
- Lacks some advanced Git features
- Requires more setup and configuration
- May have compatibility issues with certain Git workflows
Code Comparison
libgit2:
git_repository *repo = NULL;
git_repository_open(&repo, "path/to/repository");
git_oid oid;
git_reference_name_to_id(&oid, repo, "HEAD");
git_commit *commit;
git_commit_lookup(&commit, repo, &oid);
git-scm.com (Ruby):
repo = Rugged::Repository.new("path/to/repository")
commit = repo.head.target
Summary
libgit2 is a powerful C library for Git operations, offering cross-platform support and high performance. It's ideal for embedding Git functionality in other applications. However, it may lack some advanced features and require more setup compared to git-scm.com.
git-scm.com, on the other hand, is the official Git website and documentation repository. It provides comprehensive information about Git but doesn't offer a programming library like libgit2.
The code comparison shows that libgit2 requires more explicit steps for repository operations, while git-scm.com (using Rugged, a Ruby binding for libgit2) offers a more concise syntax for similar tasks.
A simple version control system built on top of Git
Pros of Gitless
- Simplified command structure, reducing cognitive load for new users
- Abstracts away some of Git's complexities, making version control more accessible
- Provides a more intuitive workflow for common operations
Cons of Gitless
- Limited adoption and community support compared to Git
- Lacks some advanced features and flexibility of Git
- May require additional learning when transitioning to traditional Git workflows
Code Comparison
Gitless:
gl track file.txt
gl commit -m "Add file.txt"
gl branch new-feature
gl switch new-feature
Git:
git add file.txt
git commit -m "Add file.txt"
git branch new-feature
git checkout new-feature
Summary
Gitless aims to simplify version control by providing a more user-friendly interface to Git operations. It offers a streamlined command structure and abstracts away some of Git's complexities, making it potentially easier for beginners to grasp. However, Gitless has a smaller user base and community support compared to Git, and may lack some advanced features. The trade-off between simplicity and power depends on the user's needs and experience level.
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
Git Homepage
This is the web application for the git-scm.com site. It is meant to be the first place a person new to Git will land and download or learn about the Git SCM system.
This app is written in Ruby on Rails and deployed on Heroku.
Setup
You'll need a Ruby environment to run Rails. First do:
$ rvm use .
$ bundle install
Then you need to create the database structure:
$ rake db:migrate
Alternatively you can run the script at script/bootstrap
which will set up Ruby dependencies and the local SQLite database.
Now you'll want to populate the man pages. You can do so from a local Git source clone like this:
$ GIT_REPO=../git/.git rake local_index
This will populate the man pages for all Git versions. You can also populate them only for a specific Git version (faster):
$ version=v2.23.0
$ GIT_REPO=../git/.git REBUILD_DOC=$version rake local_index
Or you can populate the man pages from GitHub (much slower) like this:
$ export GITHUB_API_TOKEN=github_personal_auth_token
$ rake preindex # all versions
$ REBUILD_DOC=$version rake preindex # specific version
Similarly, you can also populate the localized man pages. From a local clone of https://github.com/jnavila/git-html-l10n :
$ GIT_REPO=../git-html-l10n/.git rake local_index_l10n # all versions
$ GIT_REPO=../git-html-l10n/.git REBUILD_DOC=$version rake local_index_l10n # specific version
Or you can do it from GitHub (much slower) like this:
$ export GITHUB_API_TOKEN=github_personal_auth_token
$ rake preindex_l10n # all versions
$ REBUILD_DOC=$version rake preindex_l10n # specific version
Now you need to get the latest downloads for the downloads pages:
$ rake downloads
Now you'll probably want some book data. You'll have to have access to the Pro Git project on GitHub through the API.
$ export GITHUB_API_TOKEN=github_personal_auth_token
$ rake remote_genbook2
If you have 2FA enabled, you'll need to create a Personal Access Token.
That will generate the book content from the Asciidoc files fetched from the online repository and post it to the Rails server database. You can select a specific language by indicating it in the GENLANG
environment variable:
$ GENLANG=zh rake remote_genbook2
Alternatively, you can get the book content from a repository on your computer by specifying the path in the GENPATH
environment variable to the local_genbook2
target:
$ GENLANG=fr GENPATH=../progit2-fr rake local_genbook2
Now you can run the Rails site to take a look.
$ ./script/server
The site should be running on http://localhost:5000
Testing
To run the tests for this project, run:
$ rspec
To run the website for testing purposes, run:
$ ./script/server
Contributing
If you wish to contribute to this website, please fork it on GitHub, push your change to a named branch, then send a pull request. If it is a big feature, you might want to start an issue first to make sure it's something that will be accepted. If it involves code, please also write tests for it.
Adding new GUI
The list of GUI clients has been constructed by the community for a long time. If you want to add another tool you'll need to follow a few steps:
-
Add the GUI client details at the YAML file: https://github.com/git/git-scm.com/blob/main/resources/guis.yml
- The fields
name
,url
,price
,license
should be very straightforward to fill. - The field
image_tag
corresponds to the filename of the image of the tool (without path, just the filename). platforms
is a list of at least 1 platform in which the tool is supported. The possibilities are:Windows
,Mac
,Linux
,Android
, andiOS
order
can be filled with the biggest number already existing, plus 1 (Adding to the bottom - this will be covered in the following steps)trend_name
is an optional field that can be used for helping sorting the clients (also covered in the next steps)
- The fields
-
Add the image to
public/images/guis/<GUI_CLIENT_NAME>@2x.png
andpublic/images/guis/<GUI_CLIENT_NAME>.png
making sure the aspect ratio matches a 588:332 image. -
Sort the tools
- From the root of the repository, run:
$ ./script/sort-gui
- A list of google trends url's will be displayed at the bottom if everything went well.
- Open each and check if the clients are sorted.
- If the clients are not sorted, just fix the order (by changing the
order
field), bubbling the more 'known' clients all the way up. - Repeat until the order stabilizes.
- It is possible that your new GUI client doesn't have good results in Google Trends. You can try similar terms (for instance, adding the git keyword sometime helps). If you find any similar term that returns better results, add the
trend_name
field to the GUI client. Have a look at theTower
andCycligent Git Tool
tools example. - The script makes some basic verifications. If there was some problem, it should be easily visible in the output
- If you have more than 1 tool with the same name, a warning will appear:
======= WARNING: THERE ARE DUPLICATED GUIS =======
- If you are using the same
order
value for more than 1 tool, a warning will appear:======= WARNING: THERE ARE DUPLICATED ORDERS (value: <VALUE>) =======
- From the root of the repository, run:
FAQ
While setting the repo if you find any error, check if it's a known issue and the corresponding solution bellow.
An error occurred while installing pg (1.2.3), and Bundler cannot continue.
If you got this error when running bundle install
, then you need to install postgresql on your OS. Check this stackoverflow topic for more details.
License
The source code for the site is licensed under the MIT license, which you can find in the MIT-LICENSE.txt file.
All graphical assets are licensed under the Creative Commons Attribution 3.0 Unported License.
Top Related Projects
Pro Git 2nd Edition
A collection of useful .gitignore templates
Git extension for versioning large files
Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
A cross-platform, linkable library implementation of Git that you can use in your application.
A simple version control system built on top of Git
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