11 KiB
#git #gitea #오류 #에러 #조치방법
2025.12.11
warning: in the working copy of '.obsidian/workspace.json', LF will be replaced by CRLF the next time Git touches it
에러 발생할 경우 조치
git config --global core.autocrlf true
출처 : https://dabo-dev.tistory.com/13
[git] 원격 저장소와 local저장소의 소스코드를 일치시키는 방법
git fetch origin main
(원격저장소와 로컬저장소를 일치)
git pull origin main
(실제로 원격저장소의 소스코드와 로컬저장소의 소스코드를 merge)
git add "파일명"
git commit -m "업데이트 내용"
git checkout main
git branch
브렌치 목록확인할때
! [rejected] main -> main (non-fast-forward) error: failed to push some refs to 'http://192.168.1.44:3000/choibk/choibk.git' hint: Updates were rejected because a pushed branch tip is behind its remote hint: counterpart. If you want to integrate the remote changes, use 'git pull' hint: before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
이렇게뜨면
git pull origin main
또는
git push origin main
친다.
git push --set-upstream origin main
git reset --hard origin/main
main 브렌치에 최신상태를 로컬에 강제로 싱크
error: Pulling is not possible because you have unmerged files. hint: Fix them up in the work tree, and then use 'git add/rm ' hint: as appropriate to mark resolution and make a commit. fatal: Exiting because of an unresolved conflict.
이 오류일때
git pull --rebase
git fetch origin main
remote: Failed to authenticate user fatal: Authentication failed for http://192.168.1.44:3000/choibk/choibk.git/'
상기와 같이 오류가 뜨면 아래를 먼저 실행해 본다.
git pull origin main
git push origin main
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git commit -m "desktop sync"
On branch main Your branch is up to date with 'origin/main'.
Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: .obsidian/community-plugins.json modified: .obsidian/core-plugins.json modified: .obsidian/workspace.json modified: "2025\353\205\204 \354\233\224\353\240\245\355\230\225 \353\251\224\353\252\250\355\230\225 \354\235\274\354\240\225.canvas" modified: "git \354\235\274\354\235\274\353\213\250\354\234\204 \354\202\254\354\232\251\354\213\234 \354\230\244\353\245\230, \354\227\220\353\237\254\353\223\261 \353\260\234\354\203\235\354\213\234 \354\241\260\354\271\230\353\260\251\353\262\225 \354\240\225\353\246\254.md"
no changes added to commit (use "git add" and/or "git commit -a")
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git pull origin main
remote: Enumerating objects: 9, done. remote: Counting objects: 100% (9/9), done. remote: Compressing objects: 100% (5/5), done. remote: Total 5 (delta 4), reused 0 (delta 0), pack-reused 0 (from 0) Unpacking objects: 100% (5/5), 833 bytes | 18.00 KiB/s, done. From http://192.168.1.44:3000/choibk/choibk
- branch main -> FETCH_HEAD 168576f..7fdc2a5 main -> origin/main Updating 168576f..7fdc2a5 error: Your local changes to the following files would be overwritten by merge: 2025년 월력형 메모형 일정.canvas Please commit your changes or stash them before you merge. Aborting
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git status
On branch main Your branch is behind 'origin/main' by 1 commit, and can be fast-forwarded. (use "git pull" to update your local branch)
Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: .obsidian/community-plugins.json modified: .obsidian/core-plugins.json modified: .obsidian/workspace.json modified: "2025\353\205\204 \354\233\224\353\240\245\355\230\225 \353\251\224\353\252\250\355\230\225 \354\235\274\354\240\225.canvas" modified: "git \354\235\274\354\235\274\353\213\250\354\234\204 \354\202\254\354\232\251\354\213\234 \354\230\244\353\245\230, \354\227\220\353\237\254\353\223\261 \353\260\234\354\203\235\354\213\234 \354\241\260\354\271\230\353\260\251\353\262\225 \354\240\225\353\246\254.md"
no changes added to commit (use "git add" and/or "git commit -a")
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git add .
warning: in the working copy of '.obsidian/community-plugins.json', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of '.obsidian/core-plugins.json', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of '.obsidian/workspace.json', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of '2025년 월력형 메모형 일정.canvas', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'git 일일단위 사용시 오류, 에러등 발생시 조치방 법 정리.md', LF will be replaced by CRLF the next time Git touches it
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git config --global core.autocrlf true
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git add .
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git commit -m "5 files update"
[main 6403011] 5 files update 3 files changed, 920 insertions(+), 885 deletions(-)
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git pull origin main
- branch main -> FETCH_HEAD Auto-merging 2025년 월력형 메모형 일정.canvas CONFLICT (content): Merge conflict in 2025년 월력형 메모형 일정.canvas Automatic merge failed; fix conflicts and then commit the result.
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main|MERGING)
$ git push origin main
To http://192.168.1.44:3000/choibk/choibk.git ! [rejected] main -> main (non-fast-forward) error: failed to push some refs to 'http://192.168.1.44:3000/choibk/choibk.git' hint: Updates were rejected because the tip of your current branch is behind hint: its remote counterpart. If you want to integrate the remote changes, hint: use 'git pull' before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main|MERGING)
$ git status
On branch main Your branch and 'origin/main' have diverged, and have 1 and 1 different commits each, respectively. (use "git pull" if you want to integrate the remote branch with yours)
You have unmerged paths. (fix conflicts and run "git commit") (use "git merge --abort" to abort the merge)
Changes to be committed: modified: .obsidian_mobi/workspace-mobile.json
Unmerged paths: (use "git add ..." to mark resolution) both modified: "2025\353\205\204 \354\233\224\353\240\245\355\230\225 \353\251\224\353\252\250\355\230\225 \354\235\274\354\240\225.canvas"
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main|MERGING) $
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main|MERGING)
$ git reset --hard origin/main
HEAD is now at 7fdc2a5 Last Sync: 2025-12-12 22:02 (Mobile)
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git status
On branch main Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git add .
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git commit -m "update"
On branch main Your branch is up to date with 'origin/main'.
nothing to commit, working tree clean
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git push origin main
Everything up-to-date
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git pull origin main
From http://192.168.1.44:3000/choibk/choibk
- branch main -> FETCH_HEAD Already up to date.
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git status
On branch main Your branch is up to date with 'origin/main'.
Changes not staged for commit: (use "git add ..." to update what will be committed) (use "git restore ..." to discard changes in working directory) modified: .obsidian/workspace.json modified: "2025\353\205\204 \354\233\224\353\240\245\355\230\225 \353\251\224\353\252\250\355\230\225 \354\235\274\354\240\225.canvas" modified: "git \354\235\274\354\235\274\353\213\250\354\234\204 \354\202\254\354\232\251\354\213\234 \354\230\244\353\245\230, \354\227\220\353\237\254\353\223\261 \353\260\234\354\203\235\354\213\234 \354\241\260\354\271\230\353\260\251\353\262\225 \354\240\225\353\246\254.md"
no changes added to commit (use "git add" and/or "git commit -a")
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git add .obsidian/workspace.json 2025년\ 월력형\ 메모형\ 일정.canvas git\ 일일단위\ 사용시\ 오류\,\ 에러등\ 발생시\ 조치방법\ 정리.md
warning: in the working copy of '.obsidian/workspace.json', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of '2025년 월력형 메모형 일정.canvas', LF will be replaced by CRLF the next time Git touches it warning: in the working copy of 'git 일일단위 사용시 오류, 에러등 발생시 조치방법 정리.md', LF will be replaced by CRLF the next time Git touches it
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git config --global core.autocrlf true
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git add .obsidian/workspace.json 2025년\ 월력형\ 메모형\ 일정.canvas git\ 일일단위\ 사용시\ 오류\,\ 에러등\ 발생시\ 조치방법\ 정리.md
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git commit -m ".obsidian/workspace.json 2025canvas git정리 업데이트"
[main 3f4020d] .obsidian/workspace.json 2025canvas git정리 업데이트 2 files changed, 173 insertions(+), 19 deletions(-)
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git push origin main
Enumerating objects: 9, done. Counting objects: 100% (9/9), done. Compressing objects: 100% (5/5), done. Writing objects: 100% (5/5), 3.07 KiB | 3.07 MiB/s, done. Total 5 (delta 3), reused 0 (delta 0), pack-reused 0 (from 0) remote: . Processing 1 references remote: Processed 1 references in total To http://192.168.1.44:3000/choibk/choibk.git 7fdc2a5..3f4020d main -> main
choibk@DESKTOP-H42HF98 MINGW64 /b/obsidian/choibk (main)
$ git pull origin main
From http://192.168.1.44:3000/choibk/choibk
- branch main -> FETCH_HEAD Already up to date.