git push origin '브랜치이름'
1-1) 정상적으로 push 된 경우
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 422 bytes | 422.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
1-2) push중 에러가 발생 할경우
! [rejected] main -> main (non-fast-forward)
error: failed to push some refs to '프로젝트 git 주소'
2-1) git pull 사용
git pull origin '브랜치 이름'
git push origin '브랜치 이름'
2-1-1) "fatal: Need to specify how to reconcile divergent branches." 가 나왔을 경우
fatal: Need to specify how to reconcile divergent branches.
git merge origin '브랜치 이름'
git pull --rebase origin '브랜치 이름'
git push origin '브랜치 이름'
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 422 bytes | 422.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
2-2) git 강제 push
git push origin '브랜치이름' --force
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 8 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 422 bytes | 422.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.