./categories/dev-ops
Git Workflow
기초
git clone <URL> .
git add .
git add <file>
git reset HEAD <file>
git commit -m "msg"
git reset --soft HEAD^
git reset HEAD^
git push [remote] [branch]
페어 원격
git clone <URL>
git remote add pair <pair-URL>
git remote -v
git add .
git commit -m 'change'
git push origin master
git pull pair master
Conflict
- pull/merge 전 working·staging dirty → abort 후
git status→ commit 또는 stash - 잘못된 쪽으로 merge하면
Everything up-to-date→ 양쪽 재commit 후 pull, 또는git revert로 merge 되돌리기
관련 링크: https://velog.io/@scy0334/TIL200831Git-Workflow
./comments