I Initialized local git repo and created remote repo over github.com to push local repo to remote. While creating remote I skipped creating readme file. I successfully pushed local repo to remote using the following commands:
git remote add origin https://github.com/chiragsoni2401/demoLogin.git
git push origin master
I found that I was able to push any changes from local to remote without fail.
From here I am not able to understand:
When I created readme file over remote repo then later I did some changes to my local repo this time when I tried to push the changes I got the following message:
fatal: The current branch master has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin master
I want to know why this thing happened.
Also, tell me that can we do the changes from both sides i.e. from local as well as remote or we can only do the changes in local only then push that change to the remote. If can from both the side then how to go about this?