Questions tagged [git-merge]

git-merge is a git command which integrates changes from another branch by incorporating commits into the currently checked-out branch.

Filter by
Sorted by
Tagged with
0 votes
0 answers
36 views

How do I cancel a merge commit (non-squash)?

In this case, if you output git log --online, you should see something like this c6 merge iss53 to master c5 c3 c4 c2 c1 ... As you can see, c4,c6 are commits from the master branch, and c5,c3 are ...
JoonT's user avatar
  • 1,136
0 votes
0 answers
9 views

Tailwind on my next.js project works only after refresh on some pages while works fine on other

I am working on a Next.js project with other contributor, when i am on my pages, my Tailwind works fine but when I move to their pages and revert back to mine the tailwind breaks down and works ...
Shreya Shukla's user avatar
-2 votes
0 answers
38 views

Git merge not merging properly [closed]

I have two branches. Branch develop and Branch feature. Branch feature is branched out from Branch develop and work was done on that branch. Also on branch develop some work was done. Now I am trying ...
josip's user avatar
  • 1
-1 votes
0 answers
13 views

Merge problem:a feature baranch base in dev branch long time ago merge in dev but cover dev

I have created a feature branch feature_0610 from dev branch in 2023/06/10,and then I also update some new content in dev branch.But today I merge feature_0610 into dev, it delete the new content in ...
ONE Mouth's user avatar
-1 votes
0 answers
22 views

Git Merging Issue in Jenkinsfile in all branches

I have three branches dev, qa, uat and prod in bitbucket. Each have their own Jenkinsfile and each files varies based on the credentials they use. The strategy decided by the team to use, is that ...
Thomas Raj's user avatar
0 votes
0 answers
30 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
-1 votes
0 answers
42 views

A commit ahead of the remote branch

I have forked a repository. Let's say it has 5 branches. A new branch is added in the remote repository making it 6th but I still have 5 in my fork. The newly created branch is 1 commit behind the ...
Subhash Yuvaraj's user avatar
-1 votes
0 answers
43 views

Git pull from master (again) after having reverted some conflict resolutions from previous pull

I am working on a branch local which has been branched out from the remote master. I have not yet made any changes to local however since the latter was created, somebody else worked on another local2 ...
Daneel Olivaw's user avatar
0 votes
1 answer
22 views

Git conflicts between two protected branches

So I have three branches in total deploy release and main Each of this represents a environment to be deployed on Branches: deploy --> release --> main Environments: dev uat ...
Shelton Cardin's user avatar
-1 votes
0 answers
34 views

Git Repository Implementation with Observers Design Pattern

I'm writing Git Repository implementation using Observers Pattern, but I'm getting an error. I have methods for adding webhook, commit and merge, but somehow it doesn't retrieve full information, ...
Kere's user avatar
  • 11
0 votes
0 answers
40 views

Is output of fast-forward and --no-ff merge same? [duplicate]

Please consider the following git branches: If we type the command git merge feature, git does a fast forward merge and basically moves the master pointer to feature pointer, but the files will keep ...
DumbCoder's user avatar
  • 249
0 votes
0 answers
29 views

How do i fix, bad object refs/remotes/origin/master?

git pull --tags origin master fatal: bad object refs/remotes/origin/master please help me fix, i've trying to commit been trying to commit ans sync my changes commit and sync, after working on few ...
Hloni's user avatar
  • 1
-1 votes
1 answer
50 views

Git: Replace main branch with other branch

I've taken over a repo and the previous dev had a branch that basically became the main branch. This branch is what they were pushing to production. The main branch doesn't have functioning code, and ...
JoeTheSmiter's user avatar
0 votes
2 answers
69 views

Cannot do a soft reset in the middle of a merge, but there is no merge to abort

After mistakenly running git stash pop one extra time, I ran into merge conflicts. I tried to resolve them using an unfamiliar (for me) Git client but didn’t succeed fully, so I decided to quit merge ...
Anton Strogonoff's user avatar
0 votes
1 answer
39 views

How to get content from a remote feature branch to another local feature branch

I'm new to git, and how I fell into the problem is here step-by-step : I've cloned main branch's all content from a remote repository (let's say = https:github.com/myrepo) using command : git clone ...
Aaditya's user avatar
0 votes
0 answers
72 views

Git merge branches with renamed files

We have two branches one main and other development. We do our changes on the development branch and periodically merge it with main. In my recent changes I did some file renames in the development ...
Alok's user avatar
  • 23
0 votes
0 answers
47 views

GIT merge a branch from one repo to a branch of another repo

Having a bit a GIT problem when trying to merge a branch from one repo to the branch of another repo. The nut of the problem is that once the process is finished and I try to push to the branch I am ...
Yeoman78's user avatar
0 votes
1 answer
91 views

git reports merge conflict although files are the same

I have a master branch and development/Server branch in git. I created Pull Request and trying to merge development/Server to master branch but I am facing conflict. I am getting conflicts for 2 files:...
Veljko's user avatar
  • 3
1 vote
1 answer
97 views

git: How automatically merge non-conflicting changes in the same file?

I am trying to resolve a git conflict. Let's say I have a file versions.json which is already existing in the repo: { "a": { "name": "component-a", "...
jaw's user avatar
  • 962
0 votes
0 answers
59 views

I want to checkout into an existing branch but handle it as a new branch

I want to achieve the following graph topology: master: A---B---C \ / \ dev: F---G H When i checkout to dev after merging C, i want H to not be linked to G, but to C. How do i do ...
MachineLeon's user avatar
0 votes
1 answer
32 views

How can I list files containing conflict markers without duplicates?

I'm using git diff --name-only -S==== to try to list files with conflict markers, because sometimes I've resolved a conflict in my text editor but I forgot to mark it as merged. But the problem is, if ...
Adam Burley's user avatar
  • 5,696
3 votes
1 answer
63 views

Can I merge Git branches without checking one of them out first?

Is there a way to merge a branch regardless of what branch you have checked out? Does Git support merges with --source and --destination flags? I am looking for a simple command that supports ...
user5855178's user avatar
0 votes
1 answer
43 views

Change git history of PR merged long time ago from commit method to squash method

Hello to the community! As you can see in the diagram there is a commit (cm1) that includes a lot of binary files that was committed in a local branch. This commit was reverted at cm2 and at the final ...
Nebula's user avatar
  • 51
0 votes
0 answers
14 views

How to regularly merge a GIT repo A into repo B, and keep the merge conflicts to the minimum despite features differences?

I have a base repo A, with most of my colleagues working on it. For a customer, we had some special features, so we copied and created repo B, and added a few custom features. Now, we would like to ...
Sylvain's user avatar
  • 689
0 votes
0 answers
38 views

Bitbucket: why allow 1 but not 0 commits behind the target branch?

In Bitbucket (cloud), one can configure a merge restriction to require a PR branch to be at most a certain number of commits behind the target branch. An interesting use case I see is to require the ...
Milo's user avatar
  • 2,081
-1 votes
1 answer
19 views

How to disable `npm-merge-drive` in git merge

When I cherry-pick some commit that has conflicts with package-lock.json file, the npm-merge-drive run when it failed the cherry-pick fails, how can I remove it?
Raz Luvaton's user avatar
  • 3,362
0 votes
0 answers
28 views

Github PR's merged commit author is overriden by Github main email address

I need to use two separate email addresses in Github for different purposes. In order to achieve this, I have added a secondary email to my account and I author my git commits with this exact same ...
phvega's user avatar
  • 1
0 votes
0 answers
8 views

Pre Merge Commit Server Hook in Self Hosted Gilab CE

Before briefing my issue, here is he snap of my environment - SVN - Gitlab Self Hosted Community Edition Version - 15.3 So in the above gitlab server I am trying to setup a Pre-Merge-Commit server ...
Albus's user avatar
  • 161
0 votes
0 answers
52 views

Resolve GIT Merge conflicts via command line programmatically?

I am trying to clean up the branches in my repository programmatically from time to time just to maintain the hygiene and delete un-required branches. Since my team is big with multiple developers ...
Anuj Agrawal's user avatar
1 vote
1 answer
35 views

pulling from a repo is causing merge conflicts with 8 year old files, despite regularly pulling from this repo

Context I am developing alpha. alpha is a clone of beta (not a fork). beta is an ever evolving project that I am tracking. Problem Once a month, I run git pull beta master to get the latest changes ...
psf's user avatar
  • 11
4 votes
2 answers
186 views

Git merge strategies for Kanban, production support, environment

We are currently re-evaluating our git merge strategy. Our current workflow for our existing "production support" projects is thus: When you start development, you create your branch from ...
Serj Sagan's user avatar
  • 29.2k
-1 votes
1 answer
33 views

Ignore folder during Gitlab merge request comparison

I have 2 branches dev and qa. I have two folders inside the repository 'api' and 'db'. 'db' folder is created just for having a backup. However contents of 'db' folder is different in qa branch as ...
Pavan Kumar's user avatar
0 votes
0 answers
24 views

Can squashing a merge commit cause issues when merging to main branch?

Created a feature branch from develop. Added few commits and pushed to remote. Merged develop branch into my feature branch to get latest changes and pushed to remote. Added few more commits and ...
javanoob's user avatar
  • 6,150
0 votes
3 answers
141 views

Why does GitHub add all commits from the feature branch to main when doing a merge commit?

From my understanding, a git merge from a feature branch to the main branch creates a new commit on main that has two ancestors (the last commit on the feature branch and the last commit on main). ...
Fred's user avatar
  • 1,214
0 votes
0 answers
17 views

How to pull the changes in Branch1 to Branch2 within the same repo?

I am working on a Forked repo (xyz) of an Upstream repo (abc). I created a branch (Branch1) and started working on it. Once Done, I raised a PR which looks like this: Open: amol wants to merge 5 ...
Amol Jadhav's user avatar
-1 votes
1 answer
30 views

Git Pull Request lagging branch conceptual clarity(In general merge commits)

In git how is it that PR with lagging branch compared to master just show the files in feature branch even though feature did not have the latest pull When I first read about merge it was either FF or ...
Anirudh Upadhyay's user avatar
1 vote
2 answers
106 views

Putting unrelated histories behind each other

For some reason (due to complicated conversion from SVN) I have two Git repositories: git repo A contains all history up to 31st December 2021 git repo B contains all history from 1st January 2022 on ...
J Fabian Meier's user avatar
1 vote
1 answer
43 views

What are merge request versions in GitLab and is that a specific GitLab feature?

In gitlab if I have an open pull request with some commits on it. On the changes panel I can see this dropdown with a version history. These versions seem to be related to the branch or merge request ...
Simeon Borisov's user avatar
0 votes
0 answers
45 views

What is best way to resolve merge conflict with protected master branch case?

In my team, we have production Gitlab with protected master branch to which I can only merge request from the browser. I accept MR myself. What's the problem: The master branch has hash F, the feature ...
koidula's user avatar
0 votes
0 answers
28 views

After merging a repo into another repo, git push fails due to bad committer data (Complaining about commits by other users from repo A)

I merged the master branch of repo A into repo B feature branch locally. Master Branch of Repo A has 1000's of commits by many different committers. I followed the general merge guidances like this ...
africandrogba's user avatar
0 votes
0 answers
9 views

Git pull folders not present in Dev branch but keep other Dev folders unchange

I need help with some git pulling/merging 2 branches: master and dev Present states: State of folder0 and folder1 in master and dev = different State of folder2 in master and dev = present in master, ...
IceAsher Chew's user avatar
-1 votes
3 answers
227 views

How to rebase my local commits on top of new commits in base branch in remote

I'm trying the bread-and-butter usecase of git rebase and it's not working as expected. According to a guide, when there are new commits to your feature's base branch in remote: "You want to get ...
Kashyap's user avatar
  • 15.7k
0 votes
0 answers
83 views

How can I bump the package.json version and include it as a commit when a merge request is merged in Gitlab?

In my project, we bump the package.json version by patch each time a MR is merged into develop, our default branch. Currently, we have added a CI/CD job that bumps the version, saves it as a commit ...
Luisus's user avatar
  • 373
-1 votes
1 answer
40 views

Rebasing with git a branch that contains a merge

Here is a git tree My goal is to rebase the commits branch_1 over master so C, E, F and G are added on master after D as in the following diagram I've setup a public github repo that reproduce the ...
gissehel's user avatar
  • 181
-1 votes
2 answers
57 views

How do I flatten this so that my git main branch is a nice straight line of commits?

This is my current git. And now when i try to change commit messages in the past (before the git merge), i think it's impossible because of this merge request in the middle. How do I straighten this ...
Kim Stacks's user avatar
  • 10.4k
0 votes
1 answer
49 views

git merge: Does it matter which commit is newer?

Suppose I have two commmits, A and B. Suppose I am merging B into A. Does it matter whether A or B is the more recent commit? Or will I get the same result independent of the timestamps?
Jagerber48's user avatar
0 votes
2 answers
53 views

Return back to existing files in a git repository after merge

One of my client have a local folder, previously connected with an on-line repository, where inside I did many modifications to files and folders. Later they said that these were not important anymore ...
SPS's user avatar
  • 465
1 vote
1 answer
80 views

My changes are deleted during merge with master after revert

I have merged a development branch into master. But it was discovered the merge introduced bugs to master, so I reverted my commit. I have fixed the bugs, but when I try to pull from master into my ...
Alx Mx's user avatar
  • 179
1 vote
1 answer
102 views

Combine several Git repositories into one (with subfolders) and preserve individual file history

I am trying to combine several Git repositories into one. I have the folowing individual repositories: -mainrepo -repo1 |-src |-pom.xml -repo2 |-src |-pom.xml -repo3 |-src |-pom.xml I ...
Solaris's user avatar
  • 11
0 votes
0 answers
35 views

Modify File/Git index in pre-merge-commit

I want to change a respository file in a pre-merge commit before it is commied. This should not necessarily have been changed by the merge. The git hook will be more complex later, but the simplest ...
tomko's user avatar
  • 62

1
2 3 4 5
68