열심히 작업 중 commit 하고, 점검 중에 있는데!! 누가 push 해버렸다!?
git push origin backup_branch
To https://github.com/addinedu-ros-5th/ros-repo-5.git
! [rejected] backup_branch -> backup_branch (fetch first)
error: failed to push some refs to 'https://github.com/addinedu-ros-5th/ros-repo-5.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
그럴 때는 rebase 옵션으로 가져오면 된다.
그러면 알아서 순서가 정렬되는데 내가 원하는 것은 아니다.
git pull --rebase origin backup_branch
git push origin backup_branch
분명히 내가 먼저 commit 올린 것 같은데!
push 순서로 기록되는 github commit 내역..
'CI&CD > Git' 카테고리의 다른 글
[Git] git push 하지 않고 작업 사항을 공유하는 방법 (1) | 2024.08.18 |
---|---|
[Git] git rebase - commit 기록을 정리하고 싶다! (0) | 2024.08.14 |
[Git] git rebase 후, git cherry-pick (3) | 2024.07.25 |
[Git] git add 되돌리기, git commit 되돌리기 (4) | 2024.07.22 |
[Git] git push 실수 후 되돌리기 (0) | 2024.07.22 |