git push 타임즈 오류: failed to push some refs to'git@xxxxxx'
1692 단어 git와github
$ git push -u origin master
To github.com:Houttuyniae/notes.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:Houttuyniae/notes.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.
git pull--rebase origin 마스터를 먼저 실행해야 합니다.
README.내려오다
$ git pull --rebase origin master
From github.com:Houttuyniae/notes
* branch master -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
만약 당신이pull하기 전에commit을 실행하고 한 번 제출했다면, 오류를 보고할 것입니다
$ git pull --rebase origin master
error: cannot pull with rebase: You have unstaged changes.
error: additionally, your index contains uncommitted changes.
error: please commit or stash them.
git stash 캐시를 먼저 실행하고 마지막에push를 해야 돼요.
$ git push -u origin master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 590 bytes | 590.00 KiB/s, done.
Total 5 (delta 3), reused 0 (delta 0)
remote: Resolving deltas: 100% (3/3), completed with 3 local objects.
To github.com:Houttuyniae/notes.git
d81c6a9..929dc11 master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.