How to Use Git? Tutorials, Workflows & Commands
发布时间:2026-10-15 | 浏览:1
Learn Git with tutorials, news, and tips
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 led to many innovative and powerful workflows and tools. Pull requests are one such popular tool that allows teams to collaborate on Git branches and efficiently review each other's code. Git is the most widely used version control system in the world today and is considered the modern standard for software development.
Here is a basic overview of how Git works:
1 Create a "repository" (project) with a git hosting tool (like Bitbucket)
Create a "repository" (project) with a git hosting tool (like Bitbucket)
2 Copy (or clone) the repository to your local machine
Copy (or clone) the repository to your local machine
3 Add a file to your local repo and "commit" (save) the changes
Add a file to your local repo and "commit" (save) the changes
4 "Push" your changes to your main branch
"Push" your changes to your main branch
5 Make a change to your file with a git hosting tool and commit
Make a change to your file with a git hosting tool and commit
6 "Pull" the changes to your local machine
"Pull" the changes to your local machine
7 Create a "branch" (version), make a change, commit the change
Create a "branch" (version), make a change, commit the change
8 Open a "pull request" (propose changes to the main branch)
Open a "pull request" (propose changes to the main branch)
9 "Merge" your branch to the main branch
"Merge" your branch to the main branch
Download Installer
Build Git on Mac OS X
Git for Windows
Debian / Ubuntu (apt-get)
Build from source
Learn Git with Bitbucket Cloud
Learn about code review in Bitbucket Cloud
Learn Branching with Bitbucket Cloud
What is version control
Why Git for your organization
Getting started
Setting up a repository
Inspecting a repository
Making a Pull Request
Migrating to Git
SVN to Git - prepping for the migration
Migrate to Git from SVN
Perforce to Git - why to make the move
Advanced Git Tutorials
Merging vs. Rebasing
Reset, Checkout, and Revert
Git or SVN? How Nuance Healthcare chose a Git branching model?
This is a guest post from Matt Shelton at Nuance Healthcare. This is the first post in a series about his team moving from Subversion to Git, why they did it, and...
Dealing with Maven dependencies when switching to Git
So we're moving to Git and we like git-flow. Now what? Let's test it all out! My team is great. They threw together a hit list of developer workflows in Confluence...
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.