У меня есть каталог под названием «FilmReview» на моем компьютере и FilmReview.git
в моем github, и он пуст. Я хочу нажимать эту папку на https://github.com/siddhartha-ramesh/FilmReview.git
.Нажатие всего каталога с локального компьютера на github.com
Я попытался следующие:
[email protected] ~/Desktop/Untitled Folder $ git init
Initialized empty Git repository in /home/siddhartha/Desktop/Untitled Folder/.git/
[email protected] ~/Desktop/Untitled Folder $ git add .
[email protected] ~/Desktop/Untitled Folder $ git commit -m "The whole Project"
[master (root-commit) 02a49f5] The whole Project
203 files changed, 39049 insertions(+)
create mode 100644 film_review/.project
create mode 100644 film_review/404.html
#Rest of the files in this folder
create mode 100644 film_review/trailers.html
create mode 100644 film_review/trailers.html~
[email protected] ~/.ssh $ ls -a
. .. key key.pub known_hosts
[email protected] ~/.ssh $ cat key.pub
ssh-rsa
# KEY HERE
[email protected] ~/Desktop/Untitled Folder $ git remote add origin [email protected]:siddhartha-ramesh/FilmReview.git
fatal: remote origin already exists.
[email protected] ~/Desktop/Untitled Folder $ git push origin master
To [email protected]:siddhartha-ramesh/FilmReview.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:siddhartha-ramesh/FilmReview.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Кто-то пожалуйста, помогите мне
А также я сделал это, но файл не загружается на мой мерзавца ступице
[email protected] ~/Desktop/Untitled Folder $ git push origin master
Username for 'https://github.com': siddhartha-ramesh
Password for 'https://[email protected]':
To https://github.com/siddhartha-ramesh/FilmReview.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'https://github.com/siddhartha-ramesh/FilmReview.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
[email protected] ~/Desktop/Untitled Folder $ git pill origin master
git: 'pill' is not a git command. See 'git --help'.
Did you mean this?
pull
[email protected] ~/Desktop/Untitled Folder $ git pull origin master
warning: no common commits
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
From https://github.com/siddhartha-ramesh/FilmReview
* branch master -> FETCH_HEAD
Merge made by the 'recursive' strategy.
README.md | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 README.md
Как говорится, попробуйте «git pull», чем повторить попытку на оригинал. –
Пожалуйста, объясните это. –
Введите 'git pull' и нажмите enter, чтобы выбрать изменения из удаленной ветви, чем' git push origin master' снова, чтобы добавьте свои файлы. Если это не работает, возможно, вы можете улучшить 'git clone [email protected]: siddhartha-ramesh/FilmReview.git' в новый каталог, чем добавлять файлы, а не' git push' .. –