The birth of Git is a very interesting story. In 1991, Linus open-sourced the Linux kernel, and countless Linux enthusiasts wrote codes for Linux all over the world. So the question is, how should these codes be managed? At first, Linus used BitKeeper (BitMover's version control software) to manage the core development of Linux. Later, BitMover stopped supporting Linux, so Linus adhered to the spirit of writing his own version and spent two weeks writing a distribution in C by himself. version control system, which is Git.
文章推荐
Git configuration and replacement of gerrit default commit-msg hook
As a basic interactive window, Git commit information can not only quickly determine the impact of commits, associate design documents, associate bugs and bugs, but also trace and improve the project or team work in the future.
The standardization of Git commit information not only reflects the professional quality of the development students, but also belongs to the company's process assets. Therefore, the specification for git commit submission is designed as follows.
Role: The role of Git is to cooperate with multiple people to develop the same project, solve the merge conflict problem of multiple people developing the same file at the same time, and mark each modification operation of each file in a log, which is convenient for later search and maintenance; source The code version control management system is a time shuttle, which can check what a file looked like at a certain time of a certain year, a certain month, and a certain time before.
Git Commit Specification and Configuration
When I normally use Git, I write commit instructions at random. When a problem is found, the version is rolled back. Looking at the disorganized submission instructions, it is impossible to figure out which content was submitted, and it is deeply affected.
Later in the learning process, I realized the Commit specification and configuration, summarized the content, and shared it.
The operation of code rollback is not used much in actual work (provided that Git is used for multi-person collaborative development). Usually, when there is a problem, it will roll back to the previous code. For example, after the just-released version arrives on the production environment server, there is a very strange bug, but in the test environment server, there is no such bug (both development and testing are confused). In order not to affect the use of users, it is necessary to quickly roll back to the previous version of the code.
This article records the specific rollback operation ideas and steps
Three sentences to test whether you understand Git
The conversation between my colleagues and the team leader caused the author to think about Git. First, I will introduce our small workshop-style Git submission process, local packaging, deleting dist files, rebuilding dist files, git add ., git commit -m 'XX ', the git push origin branch name is different from the traditional company's git submission, our company's packaging is local packaging, and the dist file is directly uploaded to the warehouse
In the project, many small partners will encounter that they do not want to develop in the current branch, because there will be many problems. If I create a new branch for testing, will the efficiency be improved? Merge the code with no problems in the test to the main branch, Is it solved? Version repairs and test modifications of different functions can all be used. Let me share my experience below.
As a developer, no matter where you go, you may have an indescribable relationship with the code repository, from clone repository => new feature branch => commit after the development function is completed => branch merge (conflict resolution) => label = > Deploying to the online environment, this series of operations is inseparable from the code version management tool Git, so familiarity with common commands will help us improve efficiency.
45 classic Git operation scenarios
Git should not be unfamiliar to everyone. Proficient use of Git has become a basic skill for programmers. Although there are excellent client tools such as Sourcetree at work, it is very convenient to merge code. But job interviews and some scenarios that need to show personal strength still require us to master enough Git commands.
Below we have sorted out 45 classic operation scenarios for daily use of Git code, which basically cover the needs of work.
How to complete Git version rollback in IDEA?
Undo operations in Git can be grouped into four categories:
The code in the workspace wants to be undone
The code added to the staging area wants to undo the code submitted to the local warehouse Want to undo the code of the remote warehouse Want to undo
Git best practices, what is the best workflow?
Today we will not talk about basic usage, but how should Git be used? We know that compared to Svn, the best part of Git lies in its branches. Branches are very flexible, but if there is a lack of a usage routine, it will be messy, especially in team collaboration, how to play Git branches?
We don't invent any wheels, nor do we design any new processes. This article mainly introduces three common workflows: Git Flow, GitHub Flow and GitLab Flow. After the introduction, let's talk about Songge's experience.
问答推荐
- How does Git withdraw commit and push?
- After Git pulls, it prompts that there are no components?
- How to ensure that the provided short message is unique after Git hashes the submitted content with sha-1
- How to ignore the specified folder in Git merge
- The code downloaded by Git clone is wrong
- How does Git commit to an online branch?
- How to solve Git push error?
- Git needs to ssh-add every time before it can be used
- Why is Git revert -m 1 commitID not executed?
- A Git version control problem
PS: What technical content do you want to see, you can leave a message in the comment area~
If you have any questions, you can add Ms. WeChat~
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。