2013-11-01 4 views
0

서버에 자식 저장소가 있습니다. 데이터를 가져 와서 가져와야합니다. 하나의 인스턴스를 가져 오려고하면 많은 파일이 저장소에 있어도 삭제됩니다. 내가 사용한 명령이 내가 두 번째를 수행하기 전에 먼저 풀에서 발생한 충돌을 해결 이러한 명령저장소에 파일을 가져 오지 않습니다.

[email protected]:/var/www/MobpazAdmin$ git add . 
[email protected]:/var/www/MobpazAdmin$ git add -u 
[email protected]:/var/www/MobpazAdmin$ git commit -m 'with add ads' 
[master 5706969] with add ads 
Committer: Manesh <[email protected](none)> 
Your name and email address were configured automatically based 
on your username and hostname. Please check that they are accurate. 
You can suppress this message by setting them explicitly: 

git config --global user.name "Your Name" 
git config --global user.email [email protected] 

After doing this, you may fix the identity used for this commit with: 

git commit --amend --reset-author 

10 files changed, 523 insertions(+), 5 deletions(-) 
create mode 100755 src/Mobpaz/AdminBundle/Controller/AdsController.php 
create mode 100644 src/Mobpaz/AdminBundle/Entity/Ads.php 
create mode 100644 src/Mobpaz/AdminBundle/Entity/AdsRepository.php 
create mode 100644   src/Mobpaz/AdminBundle/Resources/config/doctrine/metadata/orm/Ads.orm.xml 
create mode 100755 src/Mobpaz/AdminBundle/Resources/views/Ads/addads.html.twig 
create mode 100755 src/Mobpaz/AdminBundle/Resources/views/Ads/index.html.twig 
mode change 100644 => 100755 src/Mobpaz/AdminBundle/Resources/views/Logs/index.html.twig 
[email protected]:/var/www/MobpazAdmin$ git pull origin master 
[email protected]'s password: 
remote: Counting objects: 50, done. 
remote: Compressing objects: 100% (26/26), done. 
remote: Total 28 (delta 14), reused 0 (delta 0) 
Unpacking objects: 100% (28/28), done. 
From 192.168.10.241:/var/www/repositories/Mobpaz/MobpazAdmin 
* branch   master  -> FETCH_HEAD 
Auto-merging src/Mobpaz/AdminBundle/Resources/views/base.html.twig 
Auto-merging src/Mobpaz/AdminBundle/Resources/views/Logs/index.html.twig 
Auto-merging src/Mobpaz/AdminBundle/Resources/config/routing.yml 
CONFLICT (content): Merge conflict in src/Mobpaz/AdminBundle/Resources/config/routing.yml 
Automatic merge failed; fix conflicts and then commit the result. 
[email protected]:/var/www/MobpazAdmin$ git add . 
[email protected]:/var/www/MobpazAdmin$ git add -u 
[email protected]:/var/www/MobpazAdmin$ git commit -m 'with add ads' 
[master 0c0e548] with add ads 
Committer: Manesh <[email protected](none)> 
Your name and email address were configured automatically based 
on your username and hostname. Please check that they are accurate. 
You can suppress this message by setting them explicitly: 

git config --global user.name "Your Name" 
git config --global user.email [email protected] 

After doing this, you may fix the identity used for this commit with: 

git commit --amend --reset-author 

[email protected]:/var/www/MobpazAdmin$ git commit -m 'with add ads' 
# On branch master 
nothing to commit (working directory clean) 
[email protected]:/var/www/MobpazAdmin$ git pull origin master 
[email protected]'s password: 
From 192.168.10.241:/var/www/repositories/Mobpaz/MobpazAdmin 
* branch   master  -> FETCH_HEAD 
Already up-to-date. 

을 실행에있는 터미널에서 일어나는 것입니다

git add . 
git add -u 
git commit -m 'comments' 
git pull origin master 

아래에 주어진다. 제게 잘못하고있는 일을 말해 주시면 제 일이 매번 푸시하고 당길 때마다 중단됩니다.

제 문제는 저장소에있는 파일조차도 내 로컬 복사본에서 삭제된다는 것입니다.

+0

두 가지 문제가 있습니다. 자식이 제대로 구성되지 않았기 때문입니다. 'git config'를 읽고 싶으면'edit' 그리고'commit'을 실행하고'pull '명령을 실행하면'auto merge'가 경고됩니다 - 가장 간단한 용어로 git pull은 git fetch와 git 병합하십시오. – dekdev

답변

2

내가 commit과 비교할 때 push과 착각하고 있다고 생각합니다.

commit은 함께 작업 할 수있는 로컬 준비 영역을 만듭니다. 이것은 완전히 로컬이며 git 서버에는 이러한 변경 사항에 대한 개념이 없습니다.

push 변경 사항 (commit 이후)을 변경하면 서버가 변경 사항을 보류합니다.

죄송합니다. 여기에 맞지 않으면 로그에 push 전화가 없습니다.

+0

내가 이것을 체크 아웃하는 것이 좋습니다 : http://git-scm.com/docs/gittutorial – Nava2

+0

만약 내가 저지르고 끌어 내 저장소에있는 모든 파일을 병합 할 것입니다 내 로컬 저장소가 맞습니까? – user2655318

+0

예,하지만 로컬 변경 사항은 '푸시'할 때까지 원격 저장소에 반영되지 않습니다. – Nava2

관련 문제