๋ณธ๋ฌธ์œผ๋กœ ๊ฑด๋„ˆ๋›ฐ๊ธฐ

210226

ยท ์•ฝ 2๋ถ„

๋นˆ ๋ธŒ๋žœ์น˜ ์ƒ์„ฑํ•˜๊ธฐ#

git checkout --orphan empty-branch
git rm -rf .
# ๋นˆ ์ปค๋ฐ‹ ์ƒ์„ฑํ•˜๊ธฐgit commit --allow-empty -m "Initial commit"

Git Pull ์ „๋žต#

git pull ์„ ๋ณ„๋„ ์˜ต์…˜ ์—†์ด ์‹คํ–‰ํ–ˆ์„ ๋•Œ ๊ฒฝ๊ณ  ๋ฌธ๊ตฌ๊ฐ€ ๋‚˜ํƒ€๋‚ฌ๋‹ค.

warning: Pulling without specifying how to reconcile divergent branches isdiscouraged. You can squelch this message by running one of the followingcommands sometime before your next pull:
git config pull.rebase false  # merge (the default strategy)git config pull.rebase true   # rebasegit config pull.ff only       # fast-forward only
You can replace "git config" with "git config --global" to set a defaultpreference for all repositories. You can also pass --rebase, --no-rebase,or --ff-only on the command line to override the configured default perinvocation.
  • default (merge) : ๋กœ์ปฌ ๋ธŒ๋žœ์น˜์™€ ๋ฆฌ๋ชจํŠธ ๋ธŒ๋žœ์น˜์˜ Head๊ฐ€ ๋‹ค๋ฅธ ์œ„์น˜์— ์žˆ์„ ๋•Œ, pull ๋ฐ›์œผ๋ฉด, Merge ์ปค๋ฐ‹์„ ์ƒ์„ฑํ•จ.

  • rebase : ๋กœ์ปฌ ๋ธŒ๋žœ์น˜์™€ ๋ฆฌ๋ชจํŠธ ๋ธŒ๋žœ์น˜์˜ Head๊ฐ€ ๋‹ค๋ฅธ ์œ„์น˜์— ์žˆ์„ ๋•Œ, pull ๋ฐ›์œผ๋ฉด, ๋ฆฌ๋ชจํŠธ ๋ธŒ๋žœ์น˜๋ฅผ rebase ํ•˜์—ฌ history๋ฅผ ์ •๋ฆฌํ•จ.

  • fast-forward only : fast-forward ๊ด€๊ณ„์— ์žˆ์„ ๋•Œ๋งŒ pull ์„ ํ—ˆ์šฉํ•จ.

2021-02-26-210226-image-0

Git - git-pull Documentation

[GIT] Git pull ์ „๋žต (default, --ff -only, --rebase)

GitHub ํ™˜๊ฒฝ์—์„œ์˜ ์‹ค์ „ Git ๋ ˆ์‹œํ”ผ : NHN Cloud Meetup

Conventional Commit#

Conventional Commits

Git commit ๋ฉ”์„ธ์ง€ ๊ทœ์•ฝโ€Š-โ€ŠConventional Commits