옵시디언 노트 GitHub에 백업 및 퍼블릭 게시
옵시디언 노트 GitHub에 백업 및 퍼블릭 게시
🧠 옵시디언 노트 GitHub에 백업 및 퍼블릭 게시까지: 실전 가이드
📌 목표
- 옵시디언(Obsidian)으로 정리한 노트를 GitHub에 안전하게 올리기
- 민감한 정보는 제외, 기술 문서 위주로 블로그 공유
- GitHub 리포에 푸시하면서 겪은 모든 문제 상황 + 해결 과정 기록
🗂️ 작업 과정 요약
✅ 1. 폴더 정리
- 옵시디언 Vault:
/storage/emulated/0/Documents/MOS_quito
- 민감 정보 포함된 노트들 제거 또는
.gitignore
처리 .md
파일 위주로 정리하고, 첨부파일(.png, .pdf 등)은 제외
✅ 2. Git 초기화 및 리포 설정
1
2
3
4
cd /storage/emulated/0/Documents/MOS_quito
git init
git remote add origin https://github.com/M0S-quito/Obsidian.git
git branch -M main
✅ 3. Git push 시 발생한 문제들 & 해결법
⚠️ 문제 1: dubious ownership 에러
1
fatal: detected dubious ownership in repository
🧯 해결:
1
git config --global --add safe.directory /storage/emulated/0/Documents/MOS_quito
⚠️ 문제 2: no upstream branch 에러
1
fatal: The current branch main has no upstream branch.
🧯 해결:
1
git push -u origin main
⚠️ 문제 3: push 실패 (리모트에 먼저 뭐가 있음)
1
hint: Updates were rejected because the remote contains work that you do not have locally.
🧯 원인: GitHub 리포에 README.md 등 커밋 존재
🔧 해결 ① (리모트 밀어버리기):
1
git push -u origin main --force
🔧 해결 ② (머지하고 살리기):
1
2
git pull origin main --allow-unrelated-histories
git push -u origin main
✅ 4. 최종 푸시
1
2
3
git add .
git commit -m "옵시디언 정리된 노트 최초 업로드"
git push -u origin main
🧤 보안/운영 꿀팁
- GitHub Token은
repo
권한만!admin
,delete_repo
절대 금지 .gitignore
로 민감 파일 필터링- 푸시 전 반드시 백업
- 커밋 메시지에도 민감한 정보 넣지 마라
💭 정리 후기
- 옵시디언은 혼돈+정보의 집합체다
- 그냥 올리면 인생 박제됨
- 프라이빗 백업 → 정제 후 퍼블릭으로 따로 분리
- Git 에러는 무조건 나옴. 당황하지 말고 백업 후 처리
앞으로의 방향
- github에 옵시디언 파일을 기반으로 블로그 작성
- 로컬 옵시디언 파일을 업데이트 할 수 있게 자동화
질문이 있다면 아래 github로 남겨 주세요.
This post is licensed under CC BY 4.0 by the author.