I am doing a cherry-pick that resulted in a merge conflict and when I resolve it, the default merge tool, Vimdiff, is opened. With 4 panes, the top being the Local , base , and remote. However I noticed the base doesn't have the version of the file that I would expect to see if did git merge-base between the local and the remote commit. Is this is a defect in git/vimdiff how can I see which commit is being shown in the base pane ?
using vimdiff in git-merge, how can I show the commit ids?
157 Views Asked by dgunc At
1
There are 1 best solutions below
Related Questions in GIT
- problem to push files on a repository git
- diff3 output in git conflict style, including mergeable hunks
- Git Not In Sync with Local Branch
- Setting up the version control of .dotfiles while the .config is connected to a forked repo
- How to fix overriding the main branch in Git?
- I can't add text to "Message" in VS Code when committing to Git
- How can i redirect pull request from main branch to another branch
- Xcode commits (possibly outside of any branch) disappeared, how to get them back?
- Git/TortoiseGit : how to apply ONLY the changes from ONE commit from branch A, to branch B?
- How can I reintroduce username an password on git using fedora?
- GIT SKIP EMPTY DIRECTORIES
- Git smudge run once per checkout or per commit?
- I can't find ~/.profile or ~/.bashrc in C:/Users/<user>/.ssh folder
- Set environment variable during push for GitHub Actions
- Android WebRTC compile
Related Questions in GIT-MERGE
- Git merge strategies vs. merge drivers vs. mergetools
- How to convert GitHub squash and merge commits to merge commits?
- Git refusing to commit
- How to fix "this branch is 1 commit behind of master branch"
- Visual Studio does not see all merge differences. How can I add them?
- Octopus merge: keep the first parent to the target branch
- Git log of a specific branch already merged
- Revert merged PR from git master branch
- git thinks branch missing commits merged earlier
- Proper way of merging a feature branch into another feature branch
- Git cant create pull request | different commit histories | bfg --delete-files | git merge --allow-unrelated-histories
- Applying Git commits from one branch to another completely unrelated branch
- IntelliJ Merge Revision does not highlights differences and neither let me modify the files
- Calculate the ratio of merged forks to all forks of a repository to analyze if it has any impact on the success of an open-source project
- Why is the BASE file generated by TortoiseGit in merge conflict resolution 0 bytes?
Related Questions in VIMDIFF
- How to apply column before vimdiff
- vimdiff style color question: top & bottom lines
- How to select all the matched files using vimdiff so that non matching files are deled
- git diff - git difftool - vimdiff - How to compare two files from column 1 to 72 - It's possible config one of this tools
- merge two files with nvim -d or vimdiff
- git config does not set vimdiff layout properly, git 2.39
- Defining a shortcut only in vimdiff
- vimdiff: Is there a possibility to find out if the cursor is in a DiffAdd block?
- vimdiff: Move cursor into a block of deleted lines
- vim search simultaneously across all split files
- iTerm2: What is the best way to compare / diff two panes (like vimdiff)?
- Is it possible to use the git merge tools on files that contain conflict markers (i.e., `<<<`, `===`, and `>>>`) *outside* a git repo?
- vscode: how to switch window in vimdiff as ctrl+w closes the window
- List pairs of files when using vimdiff as git difftool
- Force diff/vimdiff to adjust line comparison
Related Questions in GIT-DIFFTOOL
- Can git-range-diff's results be presented in an external tool like we get with git-difftool?
- Unable to Copy Changes Back Using git-difftool with Beyond Compare 4/Meld
- Git difftool with missing file locally
- How to setup external difftool for windows 10
- Git - Get the difference between branches of two repositories
- Reset external diff tool per command
- How to debug git difftool command ( WinMerge , git on windows)
- Git with ExamDiff Pro prompts for file changes during directory comparison
- Is there a way to stop `git diff-tool` when return code is non-zero from the diff-tool is non-zero
- How can I stop git difftool?
- Is there a way to use GumtreeDiff to get diff infomation between two commits?
- Configure differerent names for git difftool labels (directory names) 'left' and 'right'?
- how to set VSCodium as git difftool
- Using git difftool for files comparsion in Debian Linux v. 10 (buster)
- git diff, with external diff program, just once
Related Questions in MERGE-BASE
- How to set --allow-unrelated-histories on FIRST pull by default?
- Unable to understand merge common ancestor output and reason of conflict
- Find all merge events between two branches
- using vimdiff in git-merge, how can I show the commit ids?
- Git merge-base produces no result on build server cloned repo
- What are the proper use cases of "git merge --squash"?
- Checking if branch has already been merged into master or dev branches on remote
- Git: how to update branch made by merge-base
- git merge-base not working on merged branch
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
vimdiff does not know the merge base commit hash ID; Git does not tell vimdiff what it is. In fact, the hash ID is not visible anywhere: Git keeps it secret.
However, you started your question text body with this:
so you can easily find the merge-base commit hash ID: it's the parent of the commit you're cherry-picking.
That's somewhat of a matter of opinion, I imagine. (I do kind of wish Git left a
MERGE_BASE_HEADfile or some such—vimdiff itself still wouldn't see it, but you could write vim scripts to show it, or just rungit rev-parsein another window or after suspending the editor.)That would be likely to give you a different commit. Cherry-pick works by artificially forcing the merge base commit to be the (single) parent of the to-be-picked commit:
If at this point you run
git cherry-pick <hash-of-C>, the "merge base" for this merge is commitP, not commit*.Running
git merge-base your-branch some-branchwould report the hash ID of commit*, but that's not the merge base of this merging-action. Git needs to take the changes fromPtoBas "your changes" to be applied toP, and combine those with their changes fromPtoC.