Git Commands


rejected master -> master (non-fast-forward)

you have a readme file inside git remote repo. but you don’t have that in your local repo.

;;;;; I created a github repository after creating my local git repository so I needed to accept the changes into local before pushing to github. In this case the only change was the readme file created as optional step when creating github repository. ;;;;;




1. git init

2. git pull*username*/*repository*.git master
in my case: git pull master

3. git add .

4. git commit -m "new commit"

5. git remote add origin

6. git push -u origin master

for file check this link

Author: joker

Leave a Reply

Your email address will not be published. Required fields are marked *