Я работаю над чем-то в github, используя репозиторий.Как добавить файлы в репозиторий git?
Я принял следующие шаги:
$ git clone https://github.com/Company/repos
Cloning into repos...
Username:
Password:
warning: You appear to have cloned an empty repository.
(да, я понимаю, что операции РЕПО пуст я должен добавить в него файлы, но не может :)
$ cd repos
$ echo hello > README.txt
$ git add README.txt
[no output]
$ git commit -m "commit"
[master (root-commit) 824324d] commit
Committer: User <[email protected]>
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
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 README.txt
(. Так что файл, кажется, в)
Сейчас я:.
$ git push
Username:
Password:
Everything up-to-date
Ничего не загружено в репозиторий! Если я повторю его снова, файлов там нет.
EDIT: Следующий чьей-то просьбе:
$ git add README2.txt
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: README2.txt
#
Является ли README.txt существующим непустым файлом или вы пытаетесь его создать через 'git add'? – marionebl
@marioebl это уже существующий файл, я его создал. – kloop
Не могли бы вы включить вывод 'git status' после' git add'? – marionebl