Github가 내 프로젝트의 기본 저장소입니다 (단지 "origin"이 "github"로 이름이 변경됨). "git push github master"가 작동하더라도 "git push"가 "non-fast-forward updates"오류를 발생 시키도록 어떤 일이 발생했습니다. "git pull"및 "git pull github master"는 둘 다 최신 상태를 나타냅니다. 어떻게하면 (a) Github에 병합되지 않은 변경 사항이 없는지, (b) 빨리 감기가 아닌 오류를 수정할 수 있습니까?Git은 'git pull'후에도 'non-fast-forward updates'오류를 표시합니다.
이+refs/heads/*:refs/remotes/github/*
간단한 git push
밀어 것 :
$ git status
# On branch master
nothing to commit (working directory clean)
$ git pull
Already up-to-date.
$ git pull github master
From github.com:MikeBlyth/mission_net
* branch master -> FETCH_HEAD
Already up-to-date.
$ git push github master
Everything up-to-date
$ git push
To [email protected]:MikeBlyth/mission_net.git
! [rejected] add_command -> add_command (non-fast-forward)
error: failed to push some refs to '[email protected]:MikeBlyth/mission_net.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
내 자식 설정 파일은 설명이 "github
"원격에 사용되는 기본 refspec과 관련이있을 수
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "github"]
url = [email protected]:MikeBlyth/mission_net.git
fetch = +refs/heads/*:refs/remotes/github/*
[branch "master"]
remote = github
merge = refs/heads/master
[remote "heroku"]
url = [email protected]:joslink.git
fetch = +refs/heads/*:refs/remotes/heroku/*
merge = refs/heads/master
[remote "heroku"]
url = [email protected]:joslink.git
fetch = +refs/heads/*:refs/remotes/heroku/*
초기 답변을 변경했습니다. – VonC
michas와 VonC의 답변을 요약하면 "git push"는 기본적으로 모든 브랜치를 푸시하려고하며 동기화되지 않은 브랜치 (add_command)가 있습니다. –