Home >Development Tools >git >what is git bash
git bash is an application suitable for the Microsoft Windows environment. It provides an emulation layer for the Git command line experience; it is equivalent to doing git related work on the window through the git bash simulated Unix command line terminal. version control.
The operating environment of this article: Windows 7 system, Git version 2.30.0, Dell G3 computer.
What is git bash?
Git Bash is an application for Microsoft Windows environments that provides an emulation layer for the Git command line experience. It is equivalent to using git bash, a simulated Unix command line terminal, on the window, and then doing git-related version control in this terminal. Simply put, it is a command line tool under Windows.
GIT (Distributed Version Control System)
Git (pronounced /gɪt/) is an open source distributed version control system that can process efficiently and at high speed Version management of projects from very small to very large. It is also an open source version control software developed by Linus Torvalds to help manage Linux kernel development.
Torvalds started developing Git as an interim solution to replace BitKeeper.
Features
The biggest difference between distributed and centralized is that developers can submit locally, and each developer can clone (git clone) locally. Copy a complete Git repository on the machine.
As shown in Figure 1 is the classic git development process.
Functional features of Git:
From the perspective of a general developer, git has the following functions:
1. Complete clone from the server Git repository (including code and version information) to a single machine.
2. Create branches and modify the code on your own machine according to different development purposes.
3. Submit the code on the branch you created on a single machine.
4. Merge branches on a single machine.
5. Fetch the latest version of the code on the server, and then merge it with your main branch.
6. Generate a patch and send it to the main developer.
7. Look at the feedback from the main developer. If the main developer finds that there is a conflict between two general developers (a conflict that can be resolved cooperatively between them), they will be asked to resolve the conflict first, and then Submitted by one of them. If the lead developer can resolve it himself, or there are no conflicts, pass.
8. Generally, developers can use the pull command to resolve conflicts. After resolving conflicts, they can submit patches to the main developer.
From the perspective of the main developer (assuming that the main developer does not need to develop code), git has the following functions:
1. Check emails or check the submission status of general developers through other methods.
2. Apply patches and resolve conflicts (you can resolve them yourself, or you can ask developers to resolve them before resubmitting them. If it is an open source project, you also need to decide which patches are useful and which ones are not).
3. Submit the results to the public server and then notify all developers.
Advantages:
Suitable for distributed development, emphasizing individuals.
The public server pressure and data volume will not be too large.
Fast and flexible.
Conflicts between any two developers can be easily resolved.
Work offline.
Disadvantages:
There is little information (at least there are very few Chinese materials).
The learning cycle is relatively long.
Does not conform to conventional thinking.
The code confidentiality is poor. Once the developer clones the entire library, all code and version information can be fully disclosed.
Recommended study: "Git Tutorial"
The above is the detailed content of what is git bash. For more information, please follow other related articles on the PHP Chinese website!