1, manage folder open git, git init input initializes the local repository, GitHub manage to create a remote repository
2, the following command associated with the local and remote repository, for my user name *****
git remote add origin [email protected]:**/manage.git
3, the local project has been code after add and commit, you want to push to a remote repository
git push origin master
At this time, given:
[Rejected] Master -> Master (non-FAST Forward)!
............
............
After searching the Internet for a long time, a variety of input errors and invalid command, finally found the solution:
1, git pull origin master --allow-unrelated-histories // remote warehouse and the local synchronization to eliminate the difference
2, re-add and commit the file
3、git push origin master
4, then you can upload a success