У меня есть репозиторий git на сервере, я должен нажать и потянуть в него свои данные. Когда я пытался вытащить один экземпляр, многие мои файлы были удалены, хотя он присутствует в репозитории. Команды я использовал приведены нижеGit не вытаскивает файлы в репозитории
git add .
git add -u
git commit -m 'comments'
git pull origin master
Это то, что происходит в терминале на выполнения этих команд
[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.
I разрешило конфликт, который произошел в первом тянуть, прежде чем делать второй. Пожалуйста, скажите мне, что я делаю неправильно, это происходит часто, поэтому моя работа прерывается после каждого нажатия и вытаскивания.
Моя проблема заключается в том, что даже файлы, находящиеся в репозитории, удаляются из моей локальной копии.
Я вижу проблемы с парами, например, git настроен неправильно. вы хотите прочитать 'git config', и если вы« правы », а затем« совершите »и сделаете немедленный« pull' git, вы будете предупреждать вас о «автоматическом слиянии» - простейшими словами, git pull делает git fetch, за которым следует git слияния. – dekdev