Git month internship dawned Collection

From start to practice now about a month, this month the time met a lot of new things, including the git version control, branch management. During this time, I deeply felt the git code management and project control of the company, the benefits of teamwork and its importance. In fact, before the start of practice to understand git for a qualified programmer, it is not not grasp, but the small number of schools before the team, for the management of the code is not strictly necessary and other reasons, so I did not learn git , to a company combat really regret it! (Qq send such a code file silly little things are not done at school)

      

       These days Liao Xuefeng carefully read the teacher's git tutorials, with some vague notion before a clearer understanding, as well as the entire project development team use git, version control, branch management, etc. have a further knowledge. Special thanks tireless brother taught me Ha ha ha!

 

       Share exchange, I learned that Huang Qi predecessors "suddenly realized collection" In the study, then hope they would be learning in such a way to organize and summarize some "suddenly realized" knowledge points in the front end of the road. So, this technology will have their own thoughts following "understood why."

 

1.Git is a distributed version control system, centralized version control system SVN distinguished. Both have their own benefits and drawbacks, but git is relatively faster, simpler, and more popular now.

Two concepts in 2.git work area and temporary area is very important. Workspace to the repository, git add storage through the workspace to the repository in the stage, the stage and staging area by git commit the changes into the branch repository. Stage staging area and branches exist in the repository. Specifically in FIG.

 

 

3.git automatically creates a master branch for us, as well as a pointer HEAD master, and points to the current branch. When you use the handover branch git branch, HEAD pointer will point to the branch. Can retreat back through git reset version, HEAD is the current revision, HEAD ~ represents the previous version, the version that is on HEAD ~~, on the one hundred is HEAD ~.

4. When you want to roll back to a specific version, or versions prior to want to return to after the rollback, commit reflog can view the instruction submitted by git log or git id id then go back to that version

5.git diff allows you to see what has changed between the local version submitted. In webstorm visual interface of this modification can be a good view (webstorm rocks!)

6. git checkout not only handover branch, may undo changes. Your code does not add, then git checkout --filename is to undo your changes to the repository in the same code, if you add code or commit, and that this directive is to undo changes back to the staging area to add status. In short, it is to make your code back to the state nearest the git add and git commit

7. Because there are a variety of functions git checkout confusing, it is also recommended to use git git switch to switch branches

8.git merge using the fast-forward mode by default, so after the merger joined delete the branch does not retain the branching information, the use of -no-ff mode information can be retained

8. In the policy branch, master should be very stable, it should be used only to release a new version, you can build a new dev branch dedicated to the development team to create a new branch in the division of labor dev.

9. When you have to work on a temporary branch to another branch bug fix, you can git stash to retain the job site, a good bug fixes can use git stash apply to return to the scene. Further in order to avoid a change in the branch to another branch duplication, use git cherry-pick <commit> command "Copy" Review

10. vi conjunction with git rebase commit the merge operation, the bifurcated into a linear organize local commit history of not push.

11.git branch management is the most important, but also the git essence, to learn!

 

These are some of my current perception of the git. Also through reflection, I think before the "technology feelings" not much of "feelings", the focus is closer to "organize" the future want to be more a "feel" approach to record their own learning growth process.

Encourage each other, come on!

Guess you like

Origin www.cnblogs.com/lwj-blog/p/11681236.html