Questions tagged [branching-and-merging]

In version control, branches represent parallel lines of development. Merging is the action that integrates changes made in different branches.

Modern version control systems (VCS) handle branching and merging by keeping track of incremental differences in data. When a user creates a branch of a project and begins making edits to that branch, only the edits made are tracked (as opposed to the user editing a true copy of the project). When the user have finished making changes to the branch, these edits are applied in order onto the destination of the merge, branches to be made and merged at any time.

Conflicts may arise if multiple changes are made to the same data in a project. Modern VCSs will alert the user and ask them to resolve the merge conflicts (choose which changes should be kept) before completing the merge.

1503 questions
20
votes
2 answers

Merging Development Branch to Main: There were no changes to merge

My main branch has some files that have different codes from the same file of development branch. The development branch is the one that has the correct version of these files but when I am trying to merge it to main branch(target); I am getting a…
aidonsnous
  • 1,475
  • 4
  • 19
  • 41
19
votes
3 answers

When SVN fails to merge and Mercurial succeeds

Before it comes up, I've already looked at several threads on this topic, including these: Merging: Hg/Git vs. SVN Mercurial compared to private branches in SVN Why is branching and merging easier in Mercurial than in Subversion? I'm looking at…
JWman
  • 297
  • 1
  • 14
19
votes
1 answer

SVN strategy using branches, and merging changes from trunk into branch

So long time user of SVN, but fairly inexperienced in branching / tagging, and when I have I suspect I'm not really using it correctly or to its full potential. I have my trunk which I work on adding new features etc. This code base is used in…
Horse
  • 3,023
  • 5
  • 38
  • 65
19
votes
2 answers

My git branch is showing 'origin/master' and 'origin/HEAD' in Sourcetree and I don't know how to merge the two

I recently merged a branch I was working on with the 'master' branch. I must have (still kind of a git n00b) done something when pushing or pulling that created both an origin/master and an origin/HEAD branches. Unfortunately, I didn't keep a record…
Zachary Abresch
  • 756
  • 3
  • 8
  • 20
18
votes
4 answers

How to find all unmerged commits in master grouped by the branches they were created in?

I have to create some code review from unmerged branches. In finding solutions, let's not go to local-branch context problem as this will run on a server; there will be just the origin remote, I will always run a git fetch origin command before…
Alex P
  • 602
  • 5
  • 19
17
votes
2 answers

Github - Merging is blocked (confusing/misleading error message)

I created a pull request, my approver requested some changes, i marked those resolved and clicked on re-request button with out seeing if the merging was blocked or unblocked. So now to unblock merging, do approver need to review the changes again…
Derrick
  • 3,669
  • 5
  • 35
  • 50
17
votes
2 answers

Android Studio - unable to merge from SVN branch

We have decided to follow the process of creating a new SVN branch for every new feature that we add to our mobile app. The ultimate goal behind this is to preserve the history for every single code change (this doesn't happen when we manually copy…
Yash Sampat
  • 30,051
  • 12
  • 94
  • 120
17
votes
8 answers

How to unshelve a shelved changelist to another branch prior to Perforce 2013?

Using Perforce Server 2012.2/538478, how can I unshelve files from the trunk to another branch? When trying to do it, I get: //filename... (not mapped to your workspace view) In Perforce 2013, I found this unshelve command to really be helpful: p4…
Yair Nevet
  • 12,725
  • 14
  • 66
  • 108
17
votes
2 answers

git pushing to a branch post merge

If I push to a branch after merging it with master, how will git handle it (Update the latest commits pushed in branch to master automatically OR do nothing OR do something else) ?
vikas
  • 1,318
  • 4
  • 16
  • 33
17
votes
2 answers

With git, how do I remove a local copy of a remote branch? Or at least pull without merging?

Another developer has deleted and rebuilt a remote branch called "development" which I already have a checked out copy. He did this delete and rebuild to remove some cruft from it. Which is great. But when I do a "git pull origin development" it…
Patrick
  • 3,302
  • 4
  • 28
  • 47
17
votes
3 answers

Mercurial - close default branch and replace with a named branch as new default

In a mercurial repo, the "default" branch has fallen very out of date to the point where it no longer makes sense to merge in the changes from "develop", a named branch which has the latest deployed version of the application. Instead of merging…
kgx
  • 1,195
  • 3
  • 15
  • 26
17
votes
2 answers

Perforce, How to integrate a change to another branch?

I have trunk and a release branch. If I fixed a bug in release branch, I definitely should integrate the fix back to trunk. However, I didn't find a command dedicated to integrate such a single change list; did I miss something?
fifth
  • 4,249
  • 9
  • 45
  • 62
16
votes
5 answers

Commit select changes to another branch then resume work on current branch?

This happens often in my work flow: I'm working on a feature in a separate branch, and while doing this I'll come across small things that need fixing but are from higher up in the framework or site layout for example. I want to switch back to the…
user58777
16
votes
1 answer

Should I avoid baseless merges in TFS?

Simple question perhaps, but one I'm having a hard time finding the answer to. I often work at a client that uses TFS as source control and they completely avoid using the baseless merge feature of TFS source control In part because in the past it…
Robba
  • 7,684
  • 12
  • 48
  • 76
16
votes
10 answers

Subversion - is trunk really the best place for the main development?

In SVN, trunk is the recommended place for the main development and I use this convention for all of my projects. However, this means that trunk is sometimes unstable, or even broken. This happens for instance when I commit something by…
Borek Bernard
  • 50,745
  • 59
  • 165
  • 240