메모/에러 메모

git non-fast-foward 에러

surimi🍥 2021. 1. 9. 01:43
반응형
Dindin@DindinLaptop MINGW64 /d/dev/Workspace_Spring (sub)
$ git status
On branch sub
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   .metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi

no changes added to commit (use "git add" and/or "git commit -a")

Dindin@DindinLaptop MINGW64 /d/dev/Workspace_Spring (sub)
$ git push -u origin main
To https://github.com/Soksurim/Spring.git
 ! [rejected]        main -> main (non-fast-forward)
error: failed to push some refs to 'https://github.com/Soksurim/Spring.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and 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.

Dindin@DindinLaptop MINGW64 /d/dev/Workspace_Spring (sub)
$

 

$ git pull

명령어로 원격저장소 (Repository)에서 한번 내려받은 후 Push하니 해결.

반응형