git常見問題

1、clone代碼git

  1. cloneurl

    1.登陸帳號密碼不對
     fatal: Authentication failed for
     2.權限不足
     Permission denied (publickey)
     或者emote: User permission denied fatal: unable to access url The requested URL returned error: 403

2、合併分支提交代碼code

  1. 合併blog

    Push rejected: Push master to origin/master was rejected by remote		提交備註格式不對會拒絕
    
     解決方法:

    git log查看提交記錄rem

    回退到上個提交版本號 好比說此次提交的是不能push到遠程倉庫的 就回退到it

    git reset --soft e5463abfc600dac9b98c3541d1af56cc7fbf97c8
     (不加--soft 會刪除掉本地代碼)
  2. pull 代碼衝突io

    Git Pull Failed
     You have not concluded your merge (MERGE_HEAD exists).
     Exiting because of unfinished merge.

    解決辦法:ast

    方法一:
     git reset --merge
     注:取消合併
     方法二:
     git add
    
     注:追加修改後的文件
     方法三:
     git commit --amend
    
     注:提交修改後的代碼
     方法四:
     git push +分支
    
     注:提交到某個分支中
相關文章
相關標籤/搜索