좋은 강의를 발견해서 git 사용법에 대해서 요약했습니다.
Commit
single commit same topic
partial staging : git add -p => [y/n] is enough
good commit messages: constist of subject and body
Branching strategies
Long-Running branches -> master node
Short lived branches -> features, bug fixes, refactor, experiments.
Pull request
purpose: communicating about and reviewing code
fork first original and make branch and make changes then, open pull reqeust
$ git branch test && git checkout test; ....
$ git push --set-upstream origin test
test is branch name
Merge confilcts
When conflicts occur?
When integrating commits from different sources
git merge, git rebase, git pull, git cherry-pick, git stash apply
More specifically, when contradictory changes happen..
$ git merge develop => CONFLICT!!
$ git status => you can see unmerged parts.
How to solve the merge CONFILT?
simply clean up the file
method 1) $ git merge --abort
Merge vs Rebase
[1] Merge: common ancestor, last commit on branch-A, last commit on branch-B
[1.1] 3 way merge - git merge branch --no-ff
[1.2] fast forward [default] - git merge branch -ff
purpose of merge commit: connecting two branches each other
[2] Rebase
[2.1] git rebase branch
[2.2] CONFICTS?
method 1) git rebase --abort
method 2) modification -> git add -> git rebase --continue
Usefule command
git reset: unstaging, remove commit ( e.g., git reset --hard [hash], git reset --soft [hash]
https://youtu.be/Uszj_k0DGsg?si=0-A7_nmfNWrgpPz1
'Background > Development' 카테고리의 다른 글
| [Network] Host Ordering and Network Ordering (0) | 2026.05.16 |
|---|---|
| SVF Internals (0) | 2026.01.06 |
| OOP 다형성 (0) | 2025.02.08 |
| [Compiler] How to build LLVM (0) | 2025.01.21 |