dev@ui-MacBook [프로젝트명] % git push --mirror https://github.com/[계정]/[저장소명].git
Enumerating objects: 12, done.
Counting objects: 100% (12/12), done.
Delta compression using up to 8 threads
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1.43 KiB | 1.43 MiB/s, done.
Total 7 (delta 0), reused 0 (delta 0), pack-reused 0
To https://github.com/[계정]/[저장소명].git
- [deleted] origin/HEAD
+ 061c0e7...a0fb4ec origin/main -> origin/main (forced update)
* [new branch] dev.shj -> dev.shj
! [remote rejected] main (refusing to delete the current branch: refs/heads/main)
error: failed to push some refs to 'https://github.com/[계정]/[저장소명].git'
문제 발생
git push 중 생긴 오류
문제 원인
작업 프로젝트와 백업용 프로젝트(git 저장소)가 달라서 발생
해결 방법
백업용 프로젝트(git 저장소)의 변경내용을 push
느낀 점
혹시 모를... 만약의 사태를 위해 백업 프로젝트가 따로 필요한 경우가 있긴 한데;; 사실 심적의 안정을 위해 필요한데 작업하느라 바빠서 잊고 있었다.