zoukankan      html  css  js  c++  java
  • Push code to remote repo failed

    Issue1:  email address *****  is not registered in your account, and you lack 'forge committer' permission

    Issue2: The result of 'git log' display two numbers included merge. 

     

     Resolution for issue1: 

    git config --global user.name "Your Name"

    git config --global user.email you@example.com      (registered email address)

    git commit --amend --reset-author

    Resolution for issue2:

    Reason: Remote repo and local repo are merged, remote repo is different with remote repo, So, We can't push local code repo to remote repo. We need to create a new branch according remote repo

    git checkout master       Switch to master branch

    git remote update         Update local repo from remote repo

    git branch -av          Check local branches

    remotes/origin/HEAD -> origin/master
    remotes/origin/archive/master_0522 8cf2da1024 
    remotes/origin/archive/recover_master-08282018155700 71bf938932 
    remotes/origin/info-it 2c580223fb 
    remotes/origin/master 7d63ba14fc 

    git checkout -b new_branch_name  remote_repo_name          Create a new branch  according remote repo and switch to this branch

    for example: git checkout -b new remotes/origin/master

    git cherry-pick  ******(number)             Move committed code from old branch to this new branch 

    git push origin master

  • 相关阅读:
    14.3
    14.2
    14.1
    第14章 抽象类和接口
    13.5
    JAVA异常处理
    12.9
    12.7
    vs 常用快捷键
    click()和onclick()的区别
  • 原文地址:https://www.cnblogs.com/coxiseed/p/12536974.html
Copyright © 2011-2022 走看看