GitHub upload files issue summary

One problem: git warning: LF will be replaced by CRLF in solution

Enter the Git Bash the git add .above statement appears.

Solution:

Enter the following statement:

$ git config core.autocrlf false

After such a configuration setting git performing add operation is no problem.

 

问题二:On branch master nothing to commit, working tree clean

Enter the Git Bash the  git commit -m " " following statement appears:

On branch master nothing to commit, working tree clean

On branch master nothing to commit, working tree clean

Meaning: the project has not been modified, it does not need to be submitted. In other words: 修改->add->修改->commitonly commitit has been addmodified.

problem solved:

To save the second revision required again addthen commit.

 

问题三:fatal: could not open '.git/COMMIT_EDITMSG': Permission denied

Enter the Git Bash the  git commit -m " " following statement appears:

fatal: could not open '.git/COMMIT_EDITMSG': Permission denied

Solution:

Enter the following statement:

$ chmod 664 COMMIT_EDITMSG

问题四:fatal: the remote end hung up unexpectedly

Enter git push origin masterappear after fatal: the remote end hung up unexpectedly indicating uploaded file is too large, leading upload failed.

Solution:

Reference blog: https://www.cnblogs.com/hanxianlong/p/3464224.html

问题五:fatal: refusing to merge unrelated histories

Enter the drop-down statement  git pull origin masterafter the emergence of fatal: refusing to merge unrelated historiesthis problem is because it is the two do not want to dry Git repository, a local library, a distal library, then local and remote irrelevant, so the merger can not be told.

Solution:

Use of coercive methods:

git pull origin master --allow-unrelated-histories

Followed by  --allow-unrelated-histories the parameters mean merging the warehouse when the permit is not relevant history of submission , and then push it back.

 

Guess you like

Origin www.cnblogs.com/zyh19980816/p/11942851.html