I installed Git on my server and successfully connected to Github. Now I want to upload my site (which has already been developed) to Github to start version tracking. However, I have a problem with this.
I signed up with Github and created an empty repository with a readme file.
I went to my server and created id_rsa.pub I copied the contents of id_rsa.pub with cat and put the key in my github account.
Now I want to push my site to the repository on Github.
However, I cannot get it to work. Please can someone give me a step-by-step guide? This is the initial boot from the server on Github.
When i do
git push -u origin master
I'm coming back:
To git@github.com:<github-username>/<github-repo-name>.git
! [rejected] master → master (without fast-forwarding)
Error: several links to could not be pressed git@github.com:<github-username>/<github-repo-name>.git
To prevent loss of history, updates without redirection were canceled. Add the remote changes again (e.g. git pull). For more information, see the "Quick Navigation Note" section git push --help.
When i do
git pull
I'm coming back:
Information about the current branch is missing. please indicate which branch you want to merge with. See git-pull (1) for more details.
git pull <remote> <branch>
If you want to set tracking information for this thread, you can do this with:
git branch --set-upstream master <remote>/<branch>
source
share