I am trying new to software development and git/github and trying to push a local repository on github and getting the following error..
Error:-
- PS C:\Users\akcai\OneDrive\Desktop\PollingApplication> git push -u
origin master
To https://github.com/atharvamishra123/polling_application.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/atharvamishra123/polling_application.git'
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.
command which i run are in the following manner:-
- PS C:\Users\akcai\OneDrive\Desktop\PollingApplication> history
Id CommandLine
-- ----------- 1 cd OneDrive
2 cd Desktop
3 ls
4 cd PollingApplication
5 ls
6 git init
7 git add .
8 git commit -m "initial_version_complete"
9 git remote add origin https://github.com/atharvamishra123/polling_application.git
10 git push -u origin master
please help i am unable to figure out what is the correct way to push local git repo on github.
Thanks in advance
Hope to here from you soon