Git intro

Published

Updated

🌱

Master version control.

Git tracks every change to the code and, on fortrabbit, deploys it with a git push. Where to learn it, how to install it, and what stays out of the repository.

About Git

Git is a distributed version control system. It records every change to the files of a project, so changes can be reviewed, undone and merged between people working in parallel on branches. Git is free and runs on the command line or in a desktop GUI.

On fortrabbit, Git also carries the code to the environment: a git push deploys, see the git push deploy tutorial.

Learn Git

Know commit, push, pull and branches before deploying with Git. Good starting points:

Install Git

Check with git --version in a terminal. macOS asks to install the command line tools on first use, Linux distributions ship it or have it as a package. On Windows, install it from git-scm.com, which includes Git Bash.

Git and GitHub

Git is the tool, GitHub is a service that hosts Git repositories and adds pull requests, issues and actions. fortrabbit deploys from GitHub, see the GitHub integration and other Git providers.

Keep the repository small

Git keeps every version of every file in the hidden .git folder, deleted files included. Large binary files such as images, videos and uploads bloat the history for good and make cloning and deploying slow. Keep the repository to code and small layout assets like icons. Uploads and content stay out, see the deployment intro on how code and content stay separate.

Written by humans and AI in collaboration.

AI use & editorial processEdit on GitHub ↗