Is this correct?

self-taught

#1

I was following through the steps on the [Initialize Git and Push to GitHub] and did

>> git remote add origin (ssh)

fatal: remote origin already exists.

>> git push -u origin master

(then got this message)

To (ssh link)
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 
'ssh link'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

what did I miss?


#2

Sounds like you deviated from some directions.

This warning usually means that whatever repo you’ve designated as your origin repo has changes that you don’t have locally. Therefore whatever additional changes you have locally can’t be pushed to origin, as git doesn’t know how to resolve the conflicts.

You can try git pull and manually fixing the conflicts.


#3

l don’t know how to work with “git pull” and resolve conflicts ???


#4

Franklins-MacBook-Pro:my_first_rails_app franklincrisp$ git remote add origin https://github.com/ftc785/my_first_rails_app.git
fatal: remote origin already exists.
Franklins-MacBook-Pro:my_first_rails_app franklincrisp$ git push -u origin master
To https://github.com/ftc785/my_first_rails_app.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to ‘https://github.com/ftc785/my_first_rails_app.git
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: ‘git pull …’) before pushing again.
hint: See the ‘Note about fast-forwards’ in ‘git push --help’ for details.

It said use SSH initially and when that did not work I looked up a post that said try https. I have tried to follow different corrections by following instructions in the chat room and have tried starting over and repeating steps. I am not sure now if I have too much of a tangled mess. It is sure frustrating to try and get started in coding when you don’t know what you you are doing and are plodding along in the dark!!! I can’t even get through the Mickey Mouse steps of just following instructions.