Showing posts with label Merge. Show all posts
Showing posts with label Merge. Show all posts

02 April 2023

How to resolve merge conflicts in Git

https://stackoverflow.com/questions/161813/how-do-i-resolve-merge-conflicts-in-a-git-repository

 

 

Try:

git mergetool

It opens a GUI that steps you through each conflict, and you get to choose how to merge. Sometimes it requires a bit of hand editing afterwards, but usually it's enough by itself. It is much better than doing the whole thing by hand certainly.


As per Josh Glover's comment:

[This command] doesn't necessarily open a GUI unless you install one. Running git mergetool for me resulted in vimdiff being used. You can install one of the following tools to use it instead: meld, opendiff, kdiff3, tkdiff, xxdiff, tortoisemerge, gvimdiff, diffuse, ecmerge, p4merge, araxis, vimdiff, emerge.


Below is a sample procedure using vimdiff to resolve merge conflicts, based on this link.

  1. Run the following commands in your terminal

    git config merge.tool vimdiff
    git config merge.conflictstyle diff3
    git config mergetool.prompt false
    

    This will set vimdiff as the default merge tool.

  2. Run the following command in your terminal

    git mergetool
    
  3. You will see a vimdiff display in the following format:

      ╔═══════╦══════╦════════╗
      ║       ║      ║        ║
      ║ LOCAL ║ BASE ║ REMOTE ║
      ║       ║      ║        ║
      ╠═══════╩══════╩════════╣
      ║                       ║
      ║        MERGED         ║
      ║                       ║
      ╚═══════════════════════╝
    

    These 4 views are

    • LOCAL: this is the file from the current branch
    • BASE: the common ancestor, how this file looked before both changes
    • REMOTE: the file you are merging into your branch
    • MERGED: the merge result; this is what gets saved in the merge commit and used in the future

    You can navigate among these views using ctrl+w. You can directly reach the MERGED view using ctrl+w followed by j.

    More information about vimdiff navigation is here and here.

  4. You can edit the MERGED view like this:

    • If you want to get changes from REMOTE

      :diffg RE
      
    • If you want to get changes from BASE

      :diffg BA
      
    • If you want to get changes from LOCAL

      :diffg LO
      
  5. Save, Exit, Commit, and Clean up

    :wqa save and exit from vi

    git commit -m "message"

    git clean Remove extra files (e.g. *.orig). Warning: It will remove all untracked files, if you won't pass any arguments.

06 June 2021

How to find what the git merge conflicts are?

 How to find what the git merge conflicts are?

After you run
$git merge <branch name 2>

If the merge failed, and it said that there was a conflict, the error message would tell you in which file the conflict was - 'Merge conflict in <file name>'.

Run -
$git diff <current branch name> <branch name 2> <file name>

you will get what the conflict is. Content in red is the change done in <current branch name>, and that in green is the change done in <branch name 2>.



21 March 2018

You cannot use Outlook to complete a Microsoft Word Mail Merge

You cannot use Outlook to complete a Microsoft Word Mail Merge


Symptoms


You use Microsoft Word to start a Mail Merge that is configured to send email messages to the recipients. However, Microsoft Outlook does not send the email messages. In some cases, you do not receive an error message. Or, you may receive the following error message:
Word could not load the e-mail envelope. This could be caused by a network connection problem or a problem with your Office installation.

Cause


If you are using Microsoft Outlook 2002, Microsoft Office Outlook 2003, or Microsoft Office Outlook 2007, this issue may occur if you install a newer version of Microsoft Office and then uninstall the newer version. This issue also occurs when you install a trial edition of a newer version of Microsoft Office.

If you are using Microsoft Outlook 2010, this issue may occur if you install the 64-bit version of Microsoft Office 2010 or of Microsoft Outlook 2010, you uninstall the 64-bit version, and then you install the 32-bit version.

Resolution


Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows

Outlook 2002, Outlook 2003, or Outlook 2007

To resolve this issue for Outlook 2002, for Outlook 2003, or for Outlook 2007, follow these steps:
  1. Exit all Microsoft Office applications.
  2. Start Registry Editor:
    • In Windows Vista or in Windows 7, click Startthe Start button, type regedit in the Start Search box, and then press Enter.


      User Account ControlIf you are prompted for an administrator password or for confirmation, type the password, or provide confirmation. 
    • In Windows XP, click Start, click Run, type regedit in the Open box, and then click OK.
  3. Locate and then click the following registry subkey: 
    HKEY_CLASSES_ROOT\TypeLib\{00062FFF-0000-0000-C000-000000000046}
  4. On the Edit menu, click Delete.
  5. Exit Registry Editor.
  6. Repair or reinstall the Microsoft Office program.

Outlook 2010

To resolve this issue for Outlook 2010, follow these steps:
  1. Exit all Microsoft Office applications.
  2. Start Registry Editor:
    • In Windows Vista or in Windows 7, click Startthe Start button, type regedit in the Start Search box, and then press Enter.


      User Account ControlIf you are prompted for an administrator password or for confirmation, type the password, or provide confirmation. 
    • In Windows XP, click Start, click Run, type regedit in the Open box, and then click OK.
  3. Locate and then click the following registry subkey:
    HKEY_CLASSES_ROOT\TypeLib\{00062FFF-0000-0000-C000-000000000046}\9.4\0\win64
  4. On the Edit menu, click Rename.
  5. Type BAKwin64, and then press Enter.
  6. Exit Registry Editor.
  7. Repair the Microsoft Office 2010 or Microsoft Outlook 2010 installation.
    • In Windows Vista or in Windows 7, click Startthe Start button, type programs and features in the Start Search box, and then press Enter.
    • In the list of installed programs, right-click Microsoft Office 2010 or Microsoft Outlook 2010, and then click Repair.