내 친구와 함께 프로젝트 작업에 사용하는 인터넷에 서버 (ssh를 통해 제공됨)가 있습니다. git을 소스 제어에 사용하기 시작했습니다. 다음과 같이 우리의 설치가 현재 :ssh를 통한 개인 서버의 워크 플로우와 같은 github
- 친구라는
git --bare init
와server
에 저장소를 생성 내가git clone [email protected]:/git_repos/project.jesse.git
- 를 사용
project.jesse.git
- 그때 내 로컬 컴퓨터에
server
에project.jesse.git
를 복제에server
에project.friend.git
를 복제 project.friend.git
내 로컬 컴퓨터에서 작업하고 로컬 컴퓨터에 커밋합니다. 내 변경 사항을project.jesse.git
에 넣고server
에 넣으려는 경우git push origin master
을 사용합니다. 제 친구가project.friend.git
에서 일하고 있습니다. 내가 그의 변화를 원할 때 나는pull [email protected]:/git_repos/project.friend.git
을한다.localpc:project.jesse jesse$ git push origin master Counting objects: 100, done. Delta compression using up to 2 threads. Compressing objects: 100% (76/76), done. Writing objects: 100% (76/76), 15.98 KiB, done. Total 76 (delta 50), reused 0 (delta 0) warning: updating the current branch warning: Updating the currently checked out branch may cause confusion, warning: as the index and work tree do not reflect changes that are in HEAD. warning: As a result, you may see the changes you just pushed into it warning: reverted when you run 'git diff' over there, and you may want warning: to run 'git reset --hard' before starting to work to recover. warning: warning: You can set 'receive.denyCurrentBranch' configuration variable to warning: 'refuse' in the remote repository to forbid pushing into its warning: current branch. warning: To allow pushing into the current branch, you can set it to 'ignore'; warning: but this is not recommended unless you arranged to update its work warning: tree to match what you pushed in some other way. warning: warning: To squelch this message, you can set it to 'warn'. warning: warning: Note that the default will change in a future version of git warning: to refuse updating the current branch unless you have the warning: configuration variable set to either 'ignore' or 'warn'. To [email protected]:/git_repos/project.jesse.git c455cb7..e9ec677 master -> master
내가 걱정해야이 경고 무엇인가 :
모든 것은 내가 git push origin master
을 수행 할 때 그러나, 지금 다음과 같은 오류가 발생하고, 잘 동작하는 것? 내가 말했듯이 모든 것이 효과가있는 것처럼 보입니다. 내 친구가 내 지점에서 내 변경 사항을 가져올 수 있습니다. 그는 로컬 컴퓨터에 액세스 할 수 없으므로 서버에 복제본을 가지고 있으므로 액세스 할 수 있습니다. 더 잘할 수있는 것이 있습니까?
감사합니다.
'master'가'project.jesse.git'를 가리키고 있습니까? –
@matt b, 마스터에게 보내는 변경 사항은 project.friend.git에 나타나지 않으므로 자신이 가져올 때까지 사용한다고 가정합니다. –