Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to take updates from Master into Branch in TortoiseGit

I have created a branch in Git repository 10 days before and worked on some changes in the created branch. Now I need to update my branch with master updates (ie commits done over the master after the branch taken) and need to merge with master.

help me how to achieve this in TortoiseGit.

Guide me with TortoiseGit not through Git bash or Git CLI etc.

Thanks,

like image 933
Rithik_Star Avatar asked Nov 18 '16 08:11

Rithik_Star


People also ask

How do I update TortoiseGit?

You can trigger an update check by going to the about dialog of TortoiseGit and clicking "Check for update". If you are upgrading from 1.7. 3.0 or older and you have installed the 32-bit version on a 64-bit system you have to uninstall the 32-bit version first.

Can we merge master into branch?

Then checkout the branch of interest and merge from the updated local main. We can then push the merges back to the remote repository's version of the branch. The commits are those that were committed by others to the remote repository's main branch.


2 Answers

The command you are looking for is "merge".

With merge you can integrate the changes of another branch into your active branch, e.g. integrate the changes of your Branch into master.

Merging can be done using several ways:

  1. Open the context menu in explorer, open the TortoiseGit submenu and select Merge.
  2. Open the log dialog and right click on the commit/branch you want to merge and select merge.

In both cases the very same dialog opens. Here you can select/check the branch and set some more advanced options. Clicking Ok will start the merge.

Whenever you merge conflicts can occurr, e.g. the very same file is edited on both branches., which need to be resolved manually and committed (the resulting merge commit includes your changes as well as the changes of the other branch).

Thats it.

See https://tortoisegit.org/docs/tortoisegit/tgit-dug-merge.html.

like image 185
MrTux Avatar answered Oct 18 '22 08:10

MrTux


Right click on the branch folder and do a Pull from main. It will show files in conflict and let you resolve them in the process. This was the easiest way I found to do it.

like image 1
ruttergod Avatar answered Oct 18 '22 07:10

ruttergod