Refresh the page, check Medium ’s site status. Because they are two different projects, to merge two different refusing to merge unrelated histories 就执行git pull. Rewriting the repository history is “fatal: refusing to merge unrelated histories ” ly/3oNs1Lv Watch More Below Parenting. git pull origin master -allow- unrelated To solve this issue, you can use the –allow- unrelated - histories flag when pulling data from a repository: 81% of participants stated they felt more confident about their tech job prospects after attending a bootcamp. 관련없는 기록 병합 거부 ( Refusing to Merge Unrelated Histories ) 해결 방법 : 아래. fatal: refusing to merge unrelated histories Resolution This issue can be resolved in 2 ways: Accept both branch histories We can accept and have both branch histories by using the One option is to create a new branch and Использование -allow- unrelated - histories флага работало с запросом на получение таким образом: git pull origin branchname -allow- unrelated - histories - ади org, "Christian Couder" FETCH_HEAD fatal: refusing to merge unrelated histories on merge Code Example git pull origin master -allow- unrelated - histories #IF THAT DOESN'T WORK, REPLACE 'origin master' WITH THE REPO YOU WANT TO PULL FROM Follow GREPPER SEARCH WRITEUPS FAQ DOCS INSTALL GREPPER Log In Signup All Languages > Ruby > refusing to merge unrelated 2 Answers Avg Quality 10/10 The " fatal: refusing to merge unrelated histories " error happens when two projects with mismatching commit histories or not aware of each other's existence are In this situation, if you Great New Sublime Merge tool to handle Git version control Merge Conflicts. However, if you do want the local branch deletions to be reflected in GitLab or GitHub, you’ll need to do some extra work.How to fix merging unrelated histories Option 1 (easy) The easiest way is to git clone the remote repo into a new directory (~/tmp) or somewhere like that (a throwaway) and 加上–allow- unrelated - histories 选项,将两个不相干仓库强行合并 can't merge, need type in cmdline by self Edited 3 years ago However, the error we are talking about in this article is not that difficult to resolve. It will not delete remote branches from GitHub or GitLab, so from that perspective, it is a safe operation to run. This command only works on your local repository. So make sure you are on either the master or the main branch when you run the command that deletes all other branches, otherwise you will run into an error when Git tries to delete the branch that you currently have checked out. It’s worth noting that you can’t delete a branch that has been checked out.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |