Error-log

[git] ์—ฐ๊ด€ ์—†๋Š” ์ปค๋ฐ‹ ๋ณ‘ํ•ฉ ์˜ค๋ฅ˜ | fatal: refusing to merge unrelated histories

jjingle 2024. 3. 18. 11:11

๋ฌธ์ œ ์ƒํ™ฉ

  1. ๋กœ์ปฌ์— ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ
  2. git init + init commit
  3. ๊นƒํ—ˆ๋ธŒ์—์„œ ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ ์ƒ์„ฑ + readme initial commit
  4. ๋‘ ๊ฐœ์˜ ์„œ๋กœ ๋‹ค๋ฅธ ์‹œ์ž‘์  commit์œผ๋กœ ๋จธ์ง€ ๋ถˆ๊ฐ€๋Šฅ

 

์—๋Ÿฌ ๋ฉ”์„ธ์ง€

fatal : refusing to merge unrelated histories.

error message

 

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•

  • ์„œ๋กœ ๊ด€๋ จ ์—†๋Š” ์ปค๋ฐ‹์˜ ๋จธ์ง€ ํ—ˆ์šฉ ๋ช…๋ น์–ด ์ ์šฉ 
    • --allow-unrelated-histories
    • ex.) 
  • ๋จธ์ง€ ์ปค๋ฐ‹
    1.  i )  vim edit mode
    2. ๋ฉ”์„ธ์ง€ ์ž‘์„ฑ
    3. esc )  to quit input mode
    4. :wq ) save(wrote) and quiet

 

ํ•ด๊ฒฐ ์™„๋ฃŒ

 

 

์ฐธ๊ณ 

https://gdtbgl93.tistory.com/63

 

Git push๊ฐ€ ์•ˆ๋˜๋Š” ๊ฒฝ์šฐ (fatal: refusing to merge unrelated histories)

๋กœ์ปฌ ์ €์žฅ์†Œ์— ์žˆ๋Š” ํ”„๋กœ์ ํŠธ๋ฅผ ๊นƒํ—ˆ๋ธŒ ์‚ฌ์ดํŠธ๋ฅผ ํ†ตํ•ด ๋งŒ๋“  ์ €์žฅ์†Œ๋กœ push ํ•˜๋Š” ๊ฒฝ์šฐ์— ์ด๋Ÿฐ ๋ฉ”์„ธ์ง€๊ฐ€ ๋œจ๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ๋‹ค. 12345678C:\Users\gitProject>git push origin masterTo https://github.com/userId/userProject.git !

gdtbgl93.tistory.com

https://stackoverflow.com/questions/48007493/how-can-i-write-commit-message-in-git-console

 

How can I write commit message in git console?

I am not able to write git commit message. I want to write Fixes issue #10 - one line description of changes I am not able to type anything inside git console. It does not take any keystrokes that I

stackoverflow.com