Git is a free and open source version control system, originally created by Linus Torvalds in 2005. Unlike older centralized version control systems such as SVN and CVS, Git is distributed: every developer has the full history of their code repository locally. This makes the initial clone of the repository slower, but subsequent operations such as commit, blame, diff, merge, and log dramatically faster.
Git also has excellent support for branching, merging, and rewriting repository history, which has lead to many innovative and powerful workflows and tools. Pull requests are one such popular tool that allow teams to collaborate on Git branches and efficiently review each others code. Git is the most widely used version control system in the world today and is considered the modern standard for software development.
How Git works
Here is a basic overview of how Git works:
- Create a "repository" (project) with a git hosting tool (like Bitbucket)
- Copy (or clone) the repository to your local machine
- Add a file to your local repo and "commit" (save) the changes
- "Push" your changes to your master branch
- Make a change to your file with a git hosting tool and commit
- "Pull" the changes to your local machine
- Create a "branch" (version), make a change, commit the change
- Open a "pull request" (propose changes to the master branch)
- "Merge" your branch to the master branch
Learn GitLearn Git with Bitbucket Cloud Learn about code review in Bitbucket Cloud Learn Branching with Bitbucket Cloud Learn Undoing Changes with Bitbucket Cloud
BeginnerWhat is version control What is Git Why Git for your organization Install Git Git cheat sheet
Getting StartedSetting up a repository Saving changes Inspecting a repository Undoing changes Rewriting history
Migrating to GitSVN to Git - prepping for the migration Migrate to Git from SVN Perforce to Git - why to make the move Migrating from Perforce to Git
Did you know...
Definition: A branch represents an independent line of development. Branches serve as an abstraction for the edit/stage/commit process discussed in Git Basics, the first module of this series. You can think of them as a way to request a brand new working directory, staging area, and project history. New commits are recorded in the history for the current branch, which results in a fork in the history of the project.See All References