git minor errors

(A) directly you modify the file locally, there (master | REBASE 1/2) after submission. Due to a variety of file conflicts resulting in an error.
After the pull --rebase Origin Master git
error: Pulling is not possible because you have unmerged files. hint: Fix them up in the work tree, and then use 'git add/rm <file>' hint: as appropriate to mark resolution and make a commit. fatal: Exiting because of an unresolved conflict.
(Error: Can not extract, because you have the files are not merged.
Tip: will fix them to work in the tree, and then use the 'git add/rm '
tips: Mark resolution when appropriate and submit.
Fatal: not because resolve conflicts and exit.)

Solving
solutions

1. git add -u
2. git commit -m""
3. git pull

First staging area to store the file first and then submit a comment, and then not being given a git pull
this error is generally thought that there is a conflict of file, or merge files need to resolve conflicts, solve or need to re-submit after completion of the merger, it is not limited to pulling

Finally git rebase --abort the (master | REBASE 1/2) become (master) to resubmit
(ii)
as to when the git commit code on GitHub, because the code input errors
提示:remote origin already exists,

Here attached Solution: to enter: git remote rm originre-connect to the remote database
exists to view the remote repository git remote -v
(c) show Permission denied (publickey).
lack of authority and other public key may be invalid, expired. Not ready with the public key associated with the remote ssh connection to the remote database server but was prompted to "Permission denied (publickey)", this is because you do not have the public key (publickey) to the local environment caused by ssh, or because not been many days ssh login operation, caused by the failure of local publickey. Just use ssh-add command to add a public key that is again what git push origin master

Denied Permission (publickey).
Fatal: Could not the Read from Remote respository.
Resolve on Baidu rare one. Recommended local reconstruction. . . The connection from http replace ssh. Note, github.com behind must have (colon):

Origin RM Remote Git
Git Remote the Add [email protected]: username / respository.git
, generate new ssh key. Here you will be prompted whether or not to rewrite, type y, as well as prompts for passPhrase, you can enter a space.

~ CD / .ssh
SSH-keygen
test the connection.
ssh -T -v [email protected]

Not surprisingly, then there would be an error, the last few lines message is as follows:

debug1: Offering RSA public key: yourpath/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key:yourpath/.ssh/id_dsa
debug1: Trying private key:yourpath/.ssh/id_ecdsa
debug1: Trying private key:yourpath/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).

Message indicates that the path yourpath / .ssh under id_rsa file exists, and provides public key, but not the ssh-key and matching website. Then the program goes to look for id_dsa files under yourpath / .ssh path, id_ecdsa file, id_ed25519 files to see if they are not able to provide a new public key.

Look yourpath / .ssh, you will find that there id_dsa, id_ecdsa, id_ed25519 file does not exist below. The fact that the cause of the error Step 4 updated the local ssh key, but also on the website ssh key to the old value, so the match is not over, it is an error Permission denied (publickey)

4, open yourpath / .ssh / id_rsa.pub (.pub file is the public key, id_rsa for the private key file) to copy the contents inside.

5, open https://github.com/settings/profile, then select the column in the New SSH Key SSH key, and copy the contents copied to it, select Save.

6,再次测试$ ssh -T [email protected],提示
You've successfully authenticated, but GitHub does not provide shell access.

(D) git remote add github repository when an error: fatal: remote origin already exists.

1, first delete the remote Git repository

Origin git Remote RM $
2, and then add a remote Git repository

$ Git remote add origin [email protected]: FBing / java-code-generator
If you do git remote rm origin being given, we can modify the contents of the file manually gitconfig

$ vi .git/config

The face of the wrong time to start again on a deep breath and slowly resolved. Find out where the problem lies,
do not delay, do not interrupt ideas. You can not casually knock command.
Exercise caution

Guess you like

Origin www.cnblogs.com/lijian666/p/10955927.html