When we use git to push the file to the repository, the following problem occurs:
! [Rejected] Master-> master (fetch first)
Error: failed to push some refs to '[email protected]: yaogengzhu/ajax. 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 be 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.
Solution:
1. Force upload the GIT push-f // git repository address master (but after testing, this method seems to overwrite the repository file! Exercise caution !)
2. Method 2: a) run the following command to merge the code: git pull -- rebase // repository address master
B) then use git to push // The repository address master (the method is to successfully push the file! The repository files are not affected! Recommended)
Currently, I have mastered these two methods ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
How to solve the problem that occurs during git ==== push. Error: failed to push some refs