[CS] Git Branch Day-89
2989 ワード
Git is the best tool for developers to collaborate.
When developing software, developers share the same source code.
Branch is a feature that allows multiple developers to work on different tasks at the same time.
You can do multiple tasks at the same time without affecting other people's work.
A branch is created in master or main.
A branch is an independent workspace. You can create a new branch by merging the changed part with another branch.
Changes can be applied by merging each task after working in a branch.
It allows you to do multiple tasks at the same time in the same code. You can revert to the code at a specific point in time. You can code independently without affecting other branches. Integration Branch
Deploy source code, When you create a Github Repository, a main branch is created by default. Integration Branch stands for main.
It contains the code in a state where all functions are working well. Feature Branch
A branch for adding new features and fix errors. A feature branch is merged with another branch when one task is completed.
create new branch After creating a new branch, move to the branch Check Branch List Check the list of branch and Check recent commits of branch Delete Branch Branch Conversion Merge Branch
You can copy the Origin Repository through Fork and download it to Local Storage through Clone.
Create a Branch and go to the Branch you created.
You can check the list of branches.
You can go to (Branch Name).
It is used when moving to the branch that will be the basis before merging.
To merge Branch Name2 with Branch Name1, move to Branch Name1 and use the git merge Branch Name2 command to merge.
Use push to upload local work to the github repository.
When developing software, developers share the same source code.
Branch is a feature that allows multiple developers to work on different tasks at the same time.
What is Branch?
You can do multiple tasks at the same time without affecting other people's work.
A branch is created in master or main.
A branch is an independent workspace. You can create a new branch by merging the changed part with another branch.
Changes can be applied by merging each task after working in a branch.
Advantages of Branch
Branch type
Deploy source code,
It contains the code in a state where all functions are working well.
A branch for adding new features and fix errors.
Branch Command Suite
git branch 새로운 브랜치 이름
git switch -c 새로운 브랜치 이름
git checkout -b 새로운 브랜치 이름
git branch
git branch -v
git branch -d 삭제할 브랜치 이름
git switch 브랜치 이름
git checkout 브랜치 이름
git checkout master
git merge dev
Branch workflow
Fork, Clone
You can copy the Origin Repository through Fork and download it to Local Storage through Clone.
git checkout -b (New Branch)
Create a Branch and go to the Branch you created.
git checkout -b dev
You can create dev branch and change the repository to devgit branch
You can check the list of branches.
git checkout (Branch Name)
You can go to (Branch Name).
It is used when moving to the branch that will be the basis before merging.
git merge (Branch Name1)
To merge Branch Name2 with Branch Name1, move to Branch Name1 and use the git merge Branch Name2 command to merge.
git push origin (Branch Name)
Use push to upload local work to the github repository.
Reference
この問題について([CS] Git Branch Day-89), 我々は、より多くの情報をここで見つけました https://velog.io/@cptkuk91/CS-Git-Branch-Day-88テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol