1
2
3
4
5
6
7
To https://github.com/name/resp.git
! [rejected] main -> main (non-fast-forward)
error: failed to push some refs to 'https://github.com/name/resp.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

若是有東西 可以先pull下來,因為可能本機是舊檔

1
git pull origin main

1
git push origin main

再不行 甚至雲端是空的

直接強推吧(不推薦)

1
git push -f origin main