일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- TypingEffect
- textContent
- keyup
- modal
- js
- yet
- keyboardEvent
- addEventListener
- Dom
- nodeValue
- node
- beforeinput
- javascript
- css:position
- react
- UI
- for loop
- node.js
- innerHTML
- Review
- HTML
- dotenv
- es6
- Event
- Temporal dead zone
- a11y
- Empty
- innerText
- ES5
- CSS
- Today
- Total
the murmurous sea
Git : 생활코딩 요약 본문
git init | |
git status | |
git add (file) | |
git commit | |
git commit -m "message" | |
git log | |
git log --stat | |
git diff | different, shows the differences between the last version and working tree |
git log -p | patch, shows the changes in the version |
git checkout : | navigate between the branches |
git commit -am "message" | add + commit with message at once |
git commit : | shows a default editor to add multi lined message |
git config --global core.editor "program" | how to change the editor |
git reset --hard : reset the last version | |
git reset --hard (version id) |
reset and go back to the given ID version. Delete the version and working file. You won't be able to see the after versions anymore. (because of --hard) there's other options that can handle this in various ways. You should be very aware if you work as a team in this repository. |
--hard: delete all --soft: delete only the repository version. Back to before commit. --mixed: when don't add any option, it's default. Repository and stage is cleaned. Back to before add. |
|
git revert | revert the given ID version's change (not the entire versions after this, only the version's). If there's after versions, git will throw a conflict. Revert leave a log - means it creates a new version. |
.gitignore | fires to ignore to git |
cat (file) | check the content of the file in cmd |
[branch and conflict]
mkdir (name): create a new directory
ls -al: shows all files in the current
rm (file):delete the file
git log --all --graph --oneline
directory
git branch : shows the branches
git branch (name) : create a new (name) branch
git checkout (name) : move the head to the (name) branch
git commit --amend : to change the commit message
git merge (branch name) : head should be located the major brach which is the target branch is going to be merged.
[extra - good to know]
3way mergitool: P4Merge
git mergitool : start a mergetool
git workflow
https://opentutorials.org/course/3840
opentutorials.org/course/3843/24444
git remote add origin(it's nickname) (address)
git push -u origin master : link the master of local repo & remote repo
git fetch : update the remote repository. your head could be behind of the remote branch.
git merge origin/master: merge my local and remote branches.
git fetch; git merge FETCH_HEAD (or origin/master) = git pull
: use fetch when you want to delay to merge
FETCH_HEAD : the latest fetched version
-----------------
git format-patch (original ver.)
[Code review program]
Gerrit
=============================
- Should use rebase on your local repository only. DO NOT use it after push
- the result of rebase must be the same from the result of merge m2 + t2 a file version is the same for after and before rebase, but the working copy is different.
working copy: before staging index(or staging area) : after adding the working copy to the stage merge vs rebase
https://opentutorials.org/course/3843/24444
mergetool : beyond compare (not free)
=========================
rebase conflict
git am --show-current-patch : to check the rebase conflicted patch
git | Base? |
reset | 타켓 버전 이후는 사라짐 |
revert | 되돌리려는 버전 |
merge | 공통 부모 |
cherry-pick | 체리픽한 버전의 전 버전 (부모) |
rebase | 공통부모부터 시작해서 하나씩 더해 나감 |
[quote]
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away
- Antoine de Saint-Exupery
//c75af42f8d81ff9cf01fa7ba980e0b62d5d76bda
'#dev > 개념정리' 카테고리의 다른 글
JS ES6: Functions hoisting check (0) | 2020.06.03 |
---|---|
JS: Literal (incompleted) (0) | 2020.05.27 |
Progressive Web App (PWA) (0) | 2020.05.22 |
pjax (0) | 2020.05.21 |
SPA(Single Page Application) (0) | 2020.05.21 |