-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
for: shareFor sharing issueFor sharing issuetype: documentPersonal documentsPersonal documentstype: materialFor sourcesFor sources
Description
git ์ด์ ์ํฉ ์ ๋ฆฌ
- [git pull error](#git pull error)
- [๊ธฐ์กดํ๋ก์ ํธ repository์ ์ฌ๋ฆฌ๊ธฐ](#๊ธฐ์กดํ๋ก์ ํธ repository์ ์ฌ๋ฆฌ๊ธฐ)
- [merge ์ค์๋ก ๋ฐ์ดํฐ ๋ ์๊ฐ์ ๋ / git reflog](#merge ์ค์๋ก ๋ฐ์ดํฐ ๋ ์๊ฐ์ ๋ / git reflog)
git pull error
- github์ ์๋ก์ด ํ๋ก์ ํธ๋ฅผ ํธ์ํ๊ธฐ ์ํด ์๋์ ๊ฐ์ด pull ๋ช ๋ น์ด๋ฅผ ์คํํ์ ๋ ์๋ฌ๊ฐ ๋ฐ์ํจ.
> git pull origin master
-- fatal: refusing to merge unrelated histories
- ์ด๋ด ๊ฒฝ์ฐ ์๋์ ๊ฐ์ด ์ต์ ์ ์ฃผ์ด pull ๋ฐ๋๋ก ํ์
> git pull origin <<branch name>> --allow-unrelated-histories
- ์๋ฌ๊ฐ ๋๋ ์ด์
"git merge" used to allow merging two branches that have no common base by default,
which led to a brand new history of an existing project created and then get pulled
by an unsuspecting maintainer, which allowed an unnecessary parallel history
merged into the existing project. The command has been taught not to allow this
by default, with an escape hatch "--allow-unrelated-histories" option to be used in
a rare event that merges histories of two projects that started their lives independently.
http://stackoverflow.com/questions/37937984/git-refusing-to-merge-unrelated-histories
๊ธฐ์กดํ๋ก์ ํธ repository์ ์ฌ๋ฆฌ๊ธฐ
> git init
> git add .
> git commit -m "Initial commit"
> git remote add origin <<repository url>>.git
> git push origin master
> git id(e-mail)/password ์
๋ ฅ
merge ์ค์๋ก ๋ฐ์ดํฐ ๋ ์๊ฐ์ ๋ / git reflog
- merge ํน์ rebase ์ค ์ค์๋ก ๋ด๊ฐ ์์ ํ ํ์ผ์ ๋ฎ์ด์ผ์ ๋ ๐ต๐ฑ๐ฅถ
> git reflog --date=iso
๋ก commit log๋ฅผ ํ์ธํ๊ณ rollbackํ commit log๋ก checkout ํด์ค ํ ๋ค์ ๋๋ ค ๋๋๋ค.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
for: shareFor sharing issueFor sharing issuetype: documentPersonal documentsPersonal documentstype: materialFor sourcesFor sources