As shown in How does “not something we can merge” arise?, this error can arise from a typo in the branch name because you are trying to pull a branch that doesn’t exist.
If that is not the problem (as in my case), it is likely that you don’t have a local copy of the branch that you want to merge. Git requires local knowledge of both branches in order to merge those branches. You can resolve this by checking out the branch to merge and then going back to the branch you want to merge into.
git checkout branch-name git checkout master git merge branch-name
This should work, but if you receive an error saying
error: pathspec 'remote-name/branch-name' did not match any file(s) known to git.
you need to fetch the remote (probably, but not necessarily, “origin”) before checking out the branch:
git fetch remote-name
Related Posts:
- What is the best (and safest) way to merge a Git branch into master?
- Handling file renames in Git
- Why are there two ways to unstage a file in Git?
- ‘git’ is not recognized as an internal or external command
- ‘git’ is not recognized as an internal or external command
- How to remove origin from git repository
- What’s the purpose of git-mv?
- git : Pull is not possible because you have unmerged files
- Why git asks to enter a commit message to explain why this merge is necessary
- How do I remove version tracking from a project cloned from git?
- Move the most recent commit(s) to a new branch with Git
- How to copy commits from one branch to another?
- Move the most recent commit(s) to a new branch with Git
- How do I remove version tracking from a project cloned from git?
- git pull on a different branch
- Download a specific tag with Git
- Git push won’t do anything (everything up-to-date)
- git add . -> still “nothing to commit” with new files
- git submodule add error: does not have a commit checked out
- Git error on git pull (unable to update local ref)
- git status shows modifications, git checkout —
doesn’t remove them - How do I copy a version of a single file from one Git branch to another?
- How to clone all remote branches in Git
- Update Git branches from master
- How to squash all git commits into one?
- How to interactively (visually) resolve conflicts in SourceTree / git
- How can I delete all of my Git stashes at once?
- git add only modified changes and ignore untracked files
- Remove node_modules from git in vscode
- What’s the use of the staging area in Git?
- git push –force-with-lease vs. –force
- How can I move a tag on a git branch to a different commit?
- What firewall ports need to be open to allow access to external git repositories?
- How do I prevent apache from serving the .git directory?
- Why do we need virtual functions in C++?
- What does ‘git blame’ do?
- Eclipse IDE for Java – Full Dark Theme
- What is Git pruning?
- Amazon Linux: apt-get: command not found
- What does the Java assert keyword do, and when should it be used?
- Python Logic of ListNode in Leetcode
- Git – remote: Repository not found
- How do I revert all local changes in Git managed project to previous state?
- How can I revert multiple Git commits (already pushed) to a published repository?
- What is the difference between a strongly typed language and a statically typed language?
- How to compare files from two different branches
- Proper shebang for Python script
- Git reset single file in feature branch to be the same as in master
- AttributeError: can’t set attribute
- What is difference between ‘git reset –hard HEAD~1’ and ‘git reset –soft HEAD~1’?
- How to kill a running Spark application?
- Else clause on Python while statement
- Log to the base 2 in python
- APDU command to read Track1/track2 data from NFC card and MobileApp
- git checkout tag, git pull fails in branch
- how to fix Javac invalid flag error?
- PHP & MySQL: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given
- git returns http error 407 from proxy after CONNECT
- “Insert if not exists” statement in SQLite
- Web API Error – This request has been blocked; the content must be served over HTTPS
- git: How to ignore all present untracked files?
- mount.nfs: requested NFS version or transport protocol is not supported
- How do you get the file size in C#?
- How to specify the private SSH-key to use when executing shell command on Git?
- how to use svm in Weka Classsifier?
- Why I always Got Error “Push to origin/master was rejected”?
- MIPS ‘nor’ usage in code
- Instagram how to get my user id from username?
- Procedural and non-procedural query language difference
- Push local Git repo to new remote including all branches and tags
- COM object that has been separated from its underlying RCW cannot be used
- Swift 2: !, ? -” Value of optional type “…” not unwrapped”
- Git merge without auto commit
- How to get Git to clone into current directory
- Staging Deleted files
- gerrit – git (pull vs checkout vs cherrypick) which is for what?
- Center div on the middle of screen [duplicate]
- GIT_DISCOVERY_ACROSS_FILESYSTEM not set
- What is .gitignore exactly?
- Error: You need to include some adapter that implements __karma__.start method
- I use SourceTree with Git but need to work with SVN repistory, what options do I have?
- ggplot facet_wrap: At least one layer must contain all variables used for facetting
- How can I update a wordpress plugin from a Git repository (github)
- Syncing local content with development / staging sites
- In a continuous integration environment how do you implement the database entries for plugins and themes
- Child theme on style.min.css
- jquery anchor effect does not work properly
- How to use one git (github) repository for version control for multiple themes
- Add link to php field text on wordpress form
- Theme/Plugin/Widget Data and Staging/Production Servers
- How to Unban an IP properly with Fail2Ban
- How to see stdout of ansible commands?
- Difference between KVM and QEMU
- Top level domain/domain suffix for private network?
- Are SSD drives as reliable as mechanical drives (2013)?
- The Joel Test for system administrator jobs
- How do I rename a task in Task Scheduled on Windows Server 2008 R2
- GIT as a backup tool
- How do I get the history of “apt-get install” on Ubuntu?
- Why does x86 represent 32bit when x64 represents 64bit? [closed]