Skip to main content

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.

branching-and-merging
Filter by
Sorted by
Tagged with
0 votes
1 answer
35 views

How to manage dependencies between feature branches in GitLab? [closed]

In the project I am currently working on we use git as version control and GitLab as single source of truth. We follow a branching model similar to the one described in this nvie.com blog post. For ...
Tzinm's user avatar
  • 11
-3 votes
1 answer
48 views

How to regularly transfer changes in Git from one branch to another?

I want to work in a branch A and from time to time drop changes from A to a branch B.\ But I don't want to close or delete the branch A, I want to keep working in it. What is the best way to do this? ...
Nikolai Chichulin's user avatar
0 votes
0 answers
23 views

Branching strategy 2 sprints together with SIT, UAT and master

We're using a Git branching strategy with SIT, UAT and Master branches. We aim to keep newer sprints in SIT and older one in UAT. For example, let's say Sprint 6 is currently in SIT and Sprint 5 is in ...
topgun's user avatar
  • 63
2 votes
0 answers
46 views

Branch protection rule is not allowing me to push changes in same branch second time in github

I created a branch feature/EAB-123 from the **test **branch using the following command: git checkout -b feature/EAB-123 test The branch was created successfully. I made changes, committed them, and ...
Vijay Mandanka's user avatar
1 vote
0 answers
40 views

GitHub Flow and conflicting PRs when testing in PR environment

I really like the idea of GitHub Flow and would like to give it a shot. The way we want to do testing and setup is to create a separate environment on each PR using terraform and containers. When ...
cah1r's user avatar
  • 1,879
0 votes
0 answers
18 views

ADO CI conditions not working for branching strategy

Hi I have to set branching strategy, this is my CI template which is loaded into main pipeline, but the condition rules are not working, here is my code: feature branches can only merge into develop, ...
Dimitar Grigorov's user avatar
0 votes
1 answer
32 views

Can't merge 2 branches in github: There isn't anything to compare

I created a repository with the main branch and when I was about to push the code I accidentally created another branch - master. Now, when I try to merge the 2 branches I get the message: I also get ...
Viraj Doshi's user avatar
2 votes
1 answer
32 views

Proper merging of chained feature branches

Situation I am working on features that span across multiple branches. I have a branch issue-1 that is waiting for merge with squash commits. I checked out new branch from it, issue-2 to work on it. (...
Zavael's user avatar
  • 2,454
1 vote
1 answer
48 views

How can I undo someone removing git history on master branch?

I am working on a school project and someone in my group pushed their code very late at night, however there were a couple of major issues: They pushed straight to master, not on their own branch. ...
MattyBRappps's user avatar
0 votes
1 answer
37 views

Git Merge Request to Feature Branch Includes Many Old and Unrelated Changes

Currently I have a branch, called branchA, and I wish to push my changes to another branch, called featureBranch, which was based off master. BranchA is being kept up to date with master, whereas ...
Pirri's user avatar
  • 1
-1 votes
1 answer
66 views

git: merging a branch that's already been merged by mistake

Branching strategy and some context: My team has a few sub-teams, each working on a separate project with its dedicated branch. The master branch has the common functionality and houses a major ...
Ben's user avatar
  • 605
0 votes
0 answers
41 views

Submodules: git status vs git checkout - untracked files

I have a GitHub fork which is cloned on my laptop. I also have PR which I am trying to fix. So what I did is: git checkout master git pull git checkout <my_pr_branch> At this point I got a ...
Igor's user avatar
  • 5,890
0 votes
0 answers
21 views

what happens when we add origin before master while merging?

what is the difference between git merge --no-ff origin/master and git merge --no-ff master when I don't origin it doesn't merge the changes. What exactly it does. Can someone explain?
Groot's user avatar
  • 171
0 votes
0 answers
41 views

working with feature branches leave working tree dirty

I have a 'FeatureSubmission' branch, where I am suppose to add and submit latest feature for my repo. --- Feature 2 | ---- master | \ | \...
DOOM's user avatar
  • 1,212
0 votes
2 answers
251 views

Git branching strategy for maintaining a stable release while continuing product development

I am working on a web application project. Our objective is to upgrade an existing application by adding new pages and functionality. We have completed the first phase of the project that upgraded the ...
BoMerican's user avatar
  • 180
0 votes
1 answer
47 views

Plastic SCM missing both Merge and Switch Workspace menu options, using with Unity

I can't seem to find an explanation for why essential menu operations are missing in the Plastic SCM Branch Explorer Interface (Unity Dev Ops Version Control). In Unity's Version Control window, I can ...
MXMLLN's user avatar
  • 1,467
-2 votes
1 answer
159 views

To create a branch from a git tag is a good practice?

I have started working with a new dev team, and they have a practive that I can't find in git-book about branch management: They use a single branch to centralize changes and close a tag for every ...
felipe_dmz's user avatar
1 vote
0 answers
17 views

How do I avoid hardcoding a URL to a backend environment when updating both frontend and backend in one ticket using GitLabs CI/CD?

I have a Jira ticket that requires me to update both a backend and frontend repo. When I commit and push the changes to the backend, a dynamic environment is created by the GitLab pipeline. I now need ...
Andrew Milne's user avatar
0 votes
0 answers
137 views

Query return more data than will fit on a worksheet. I need to do VLOOKUP for 1 Column, but Merge (Left outer) and filtering 1 crash query

I need to do VLOOKUP adding several Columns with data from another file, but once I do Merges (left outer) and load it - Im getting massage of more than 145M rows with proposal of converting into Data ...
Dmytro Najda's user avatar
1 vote
2 answers
150 views

Gitlab flow Long lived environment branches in Mono Repo keeps growing commit log on Pull Request in Azure repos

We have moved from IBM RTC to Git recently and facing a problem with branching strategy. We use to have three streams in RTC Jazz, Development flows to Staging & Staging flows in Production. While ...
rare_code's user avatar
0 votes
1 answer
128 views

Bypass policies when pushing but Prevent commits to Main Branch

If a user has Bypass policies when pushing enabled, how can I also configure it so that the same user is unable to commit directly to Main branch?
Geezer's user avatar
  • 495
0 votes
0 answers
41 views

Git dividing branch for new mechanic and updating both of them automatically

I have a project, and I want to try a new mechanic by modifying the old one. However, I would like git to keep Auto updating old and new mechanics branches until I'm satisfied with choosing one of ...
Jsennin's user avatar
  • 153
1 vote
0 answers
347 views

Why do I see divergent branches git errors when merging code?

Exact error message: hint: You have divergent branches and need to specify how to reconcile them. hint: You can do so by running one of the following commands sometime before hint: your next pull: ...
John Earl's user avatar
  • 115
-1 votes
1 answer
108 views

Git branching model for working on multiple versions simultaneously in 2023

So we are slowly but surely moving our development from SVN to Git (about time). Our team is quite familiar with Git but the SVN repo is quite massive and with it comes a lot of other teams and ...
Matheos's user avatar
  • 379
0 votes
0 answers
34 views

Every pull request merge increments behind commits to the main

I'm beginner to Github. First I created an empty repository by creating a only a readme file. Then I cloned it to my computer and added some files and commited them to push. It push fine because that ...
Nave3n's user avatar
  • 13
0 votes
0 answers
38 views

How to handle non-conflicting branches that break once merged

(The code examples below are fabrications to demonstrate the issue with git. Please ignore them otherwise.) Suppose I have a file source.js: function maker(str) { return `Hello ${str}!`; } function ...
Noah Bogart's user avatar
  • 1,747
0 votes
0 answers
59 views

How to protect branches' merge

🖐 I need to protect a main branch from other branches on the organization, ex. have an alpha branch, beta branch, development and main, and I must be force to push from the development branch to the ...
Yamilet Mendoza's user avatar
0 votes
0 answers
31 views

Need to merge git branch hotfix into main and dev but GitHub says there is no difference between hotfix and dev (there clearly is)

Dev is based off main; it is a work in progress for a new release, so it has much different code than main. I had to do a quick bugfix on the current version of my software, so I created a hotfix ...
Melvin's user avatar
  • 150
-1 votes
1 answer
55 views

Move all changes/commits from current branch to a different branch

I was modifying some code in a team repo and mistakenly made all my changes in the 'master' branch when I should have been working in the 'Development' branch. I committed my changes before I realized ...
TorusWithSprinkles's user avatar
0 votes
0 answers
33 views

Merge strategy when files moved between submodules

We are working on a big Unity3D project and dependencies were managed through submodules. Because that introduce no restriction between the submodules when it comes to dependency management, the ...
Bernhard's user avatar
-1 votes
1 answer
168 views

GitHub branching strategy for "servers" and "releases"

I am trying to wrap my head around creating a practical strategy for GitHub branches and deployments to multiple servers using GitHub Actions. I have the following four servers: Dev server QA server ...
Ben's user avatar
  • 16.5k
0 votes
0 answers
10 views

Branching and Merging Strategy

Our current branching and merging strategy: Developers get latest from the Develop environment and create a feature branches. Once Done, Developers merge changes back into Develop. QA then clones ...
Mark Saluta's user avatar
-1 votes
1 answer
152 views

How to restrict merging options on github

By default github provides three ways to merge a PR to a branch: Merge Commit Squash and Merge Rebase and Merge Can we add some branch rule or is there any way we can restrict them and allow only ...
Hardik3296's user avatar
0 votes
0 answers
54 views

Cannot lock ref error when pulling master branch in Sourcetree

I returned to a project I haven't worked on in many months and did the following in Sourcetree: Checkout master Pull But I got this (unable to update local ref) error and can't find a solution: git -...
user3120861's user avatar
0 votes
0 answers
34 views

git merge conflicts due to reverting: what strategies can be used to avoid such conflicts?

this images describes the issue we were facing branch k had merged b2 into itself, which was a mistake, we actually did not want any b2 related changes going into k. then k merged itself into b1, ...
Cui Pengfei 崔鹏飞's user avatar
1 vote
0 answers
35 views

Can a merge conflict occur in Git depending on the order of the branches merged?

Let's assume we have four Git branches: main, feature-a, feature-b and feature-c (where the feature branches are all originating from main). I know that feature-a and feature-b contain conflicting ...
Sebastian Lay's user avatar
1 vote
2 answers
160 views

Git rebase a branch from a branch that's also been rebased

Let's say I have this situation where branch1 was created from master. After a few commits on branch1, I also created another branch off of that called branch2. After this, someone else committed (D) ...
C.Tale's user avatar
  • 292
1 vote
1 answer
172 views

How can I keep a solved git conflict in a different branch?

Our team's branching strategy is a mix between git-flow and trunk-based. A feature is developed in a branch, then deployed to a staging environment for approval, then merged into master and deployed ...
Elías D's user avatar
0 votes
2 answers
35 views

How can I move old commits in a branch to a new branches?

I have a branch called staging that contains old commits that I would like to move to two separate branches. A - B - C - D - E - F - G - H - I staging I would like to move commits B and C to a new ...
Timothy Fisher's user avatar
0 votes
0 answers
448 views

How to setup Git with dev/stage/production branches to separates deployment tasks?

I'm looking for a way to setup a branching strategy that separates deployment tasks from each other. I recently read an article at http://guides.beanstalkapp.com/version-control/branching-best-...
artbandin's user avatar
0 votes
1 answer
71 views

Perforce: How to integrate across multiple branches

For a new feature I'm implementing, I'm looking to set up the following branches in a Perforce respository: branch A, which is the main branch, and branch B and C, both branched from A at the same ...
xEric_xD's user avatar
  • 536
0 votes
1 answer
33 views

In GitHub can I create a branch from a secondary branch and then merged it to main?

So I have the main branch. I usually open a new branch to get some work done, let call this branch_1. I have now finished my work on branch_1 and open a PR to main. But while I wait I want to do more ...
João Santos's user avatar
-1 votes
2 answers
54 views

git fetching and merging when origin and local and very different

I am working with a team project. There is this branch "current_feature" made by other developer. So I did git fetch origin current_feature and then git checkout current_feature. With that I ...
KansaiRobot's user avatar
  • 9,073
1 vote
1 answer
107 views

How to resolve merge conflict without merging branch

We use a production branch and a test branch. When we develop a new feature we branch it off production and make changes. When finished we merge it into test for it to be tested with all other ...
Roderik's user avatar
  • 302
0 votes
1 answer
334 views

What happens in git merge if one file does not exist in merged branch

I have a question about several merges from different branches. Steps Consider A and B are up to date with Master. A adds some files and changes some other files. B also adds some other files. A ...
MVana's user avatar
  • 11
1 vote
1 answer
118 views

find point where two branches in git FIRST diverged

This is slightly simplified from the real story, but hopefully close enough. Suppose I initially have one branch: develop. Then I create a new branch: release. At this point, release and develop both ...
Mark VY's user avatar
  • 1,597
0 votes
0 answers
89 views

Github branch protection forces pull request main to stage

We've setup branch protection on the branch main. Our developers merge to stage which is regularly merged into the main branch. Every time we do that GitHub suggests a new Pull Request from main to ...
theking2's user avatar
  • 2,520
2 votes
1 answer
344 views

Revert all merged commits after pushing them to remote

I have the next case. There are two branches: dev- our development branch that includes all the current results; ml_DEL-1049 - my working branch which was created for the particular task. While I was ...
Maxim Lukyanovich's user avatar
0 votes
2 answers
160 views

How to reliably run a specific git branch version of a bash script?

I have a script loop.sh that every few hours runs another script task.sh. They are both part of the same git repository. Currently, I run in a sperate screen instance (i.e. its own bash process) (main)...
Petr Doležal's user avatar
2 votes
1 answer
44 views

Move Git Diff for File from Descendant Branch to Ancestor Branch of Multiple Descendants

I am wondering if there is a way to take a file modification and move it to an ancestor of the current branch when the ancestor has multiple descendants. So in the picture, the master branch has a ...
riverofwind's user avatar

1
2 3 4 5
31