I think you have committed in the remote repository, and when you pull, this error happens.
Use this command:
git pull origin master --allow-unrelated-histories
git merge origin origin/master
More Related Contents:
- How do I discard unstaged changes in Git?
- Undo a Git merge that hasn’t been pushed yet
- How do I commit case-sensitive only filename changes in Git?
- What’s the difference between git clone –mirror and git clone –bare
- Edit the root commit in Git?
- Nested Git repositories?
- Triggering Azure DevOps builds based on changes to sub folders
- How to resolve “git did not exit cleanly (exit code 128)” error on TortoiseGit? [closed]
- Git: Receiving “fatal: Not a git repository” when attempting to remote add a Git repo
- Converting git repository to shallow?
- How to copy commits from one branch to another?
- How do I rename a Git repository?
- Reordering of commits
- How to tell if a file is git tracked (by shell exit code)?
- GitHub clone from pull request?
- Do git tags get pushed as well?
- Why does Git use a cryptographic hash function?
- Why does “git push main” work on GitHub when “git push master” does not? Also what is difference between “Main branch” and “Master branch”?
- Alter repository directory structure using sparse checkout
- Able to push to all git remotes with the one command?
- Git is deleting an ignored file when i switch branches
- How to make git status show only staged files
- git: ‘remote-https’ is not a git command?
- Git: Ignore files for public repository, but not for private
- Do you ignore a git submodule in your .gitignore or commit it to your repo?
- How can I make WinMerge my git mergetool?
- Line endings messed up in Git – how to track changes from another branch after a huge line ending fix?
- Do GitHub and GitLab support git clone’s –filter parameter?
- When will `git pull –rebase` get me in to trouble?
- How to synchronize two git repositories