성장과정(dev)/Git (feat. github, bitbucket)

git remote 연동 시 failed to push some refs to {git url} 에러

lowellSunny 2024. 11. 20. 10:18

failed to push some refs to '{ssh git uri}'

 

발생 시 여러 이유가 있겠지만, (원격저장소랑 동기화가 안되어있어서 생기는 경우도 있음)

 

나의 경우에는 commit 된 것이 없어서 그러니, commit 후에 push 해주면 된다.

 

$ git add .

$ git commit -m "first commit"

$ git push -u origin main

 

git remote add origin git@github.com:sunnylowell/effective-typescript.git
git branch -M main
git push -u origin main