3,456 questions
1
vote
2
answers
99
views
How to create a merge commit using the current index?
Sometimes I have to manually "fake" a merge due to too many merge conflicts (think e.g. binary files thanks to some proprietary software), in which case I basically do
git merge --strategy=...
4
votes
3
answers
110
views
Merging branch based off another branch that since has been merged (with squash and delete)
I am running into some weird merge conflict issues even though I am the only one working on the repository and have only made linear commits.
I have these branches:
main
feature-A (based off of main)
...
-4
votes
1
answer
66
views
How do I delete changes from an already merged branch while keeping other changes?
Here is an example of the final git log:
* 0056a18 (HEAD -> last) last
* 24a9145 Merge branch 'bad' into last
|\
| * 6a9d3c8 (bad) BAD MERGE
| |\
| | * efcc63e (init) INIT
| |/
|/|
| * 54988a7 ...
-1
votes
1
answer
57
views
How to merge two different git repos into one?
I was given access to a GitHub repository that doesn’t belong to me.
My goal: I want to clone this repo into my own new GitHub repository and then push it there.
I’ve already cloned the repo locally, ...
0
votes
2
answers
118
views
Safest way to resolve push conflicts and messy commit history after rebasing local branch with updated main?
I recently rebased my local feature branch onto the latest main branch to get up-to-date. Now, my commit history looks all weird—some commits seem duplicated or out of order, and when I try to push, I’...
-1
votes
1
answer
88
views
How can I modify a git branch merged from multiple other branches, then propagate the changes back to the correct origin branches?
I have a dozen feature branches that I would like to manually test at the same time by merging them into a single test branch, to avoid repeating the overhead of setting up the test environment for ...
-1
votes
2
answers
65
views
Squashing unrelated history merges [closed]
I have just been messing around with some other repos and doing some git merge --allow-unrelated-histories:
I now want to squash these together such that they are all part of the same history. (...
1
vote
4
answers
114
views
Testing versions of code with shared portions
I am trying to understand what is the process for testing two versions of the code while making changes to common code that is identical across versions. I want to have branch-specific code that is ...
-2
votes
3
answers
182
views
How can I work on multiple git branches at once?
Clarification: I'm asking about working on multiple branches in the same worktree. (I know how to work on multiple branches in separate worktrees, but that's not the question here.)
Suppose I'm ...
0
votes
1
answer
123
views
In git's recursive merge, in which order are merge bases are combined into temporary commits?
For recursive merges with multiple merge bases, how does git determine the order in which to merge the merge bases into temporary commits? Anecdotally, it seems to start with the two oldest merge ...
1
vote
1
answer
761
views
Embarrassing myself with git merge - adds a bunch of files and commits to my PR that I hadn't touched
Git novice here. tl;dr: I don't understand why already merged commits end up in my PR. Going to number my steps here so people can point out where I went wrong with a number.
So I'm working on a ...
-4
votes
1
answer
87
views
GIT branch of branch causes merge conflicts when original branch has been merged to main
Since about halve a year (new windows install) I have the following issue with git that I haven't noticed before.
I often have a feature branch branched from DEV.
That feature branch (A) gets put in ...
1
vote
0
answers
86
views
Strange characters appearing on merge conflict
I'm working on a French WinForm application and in the team we are using multiple git clients (VS studio, GitKraken, etc.) to manage branches and so on.
I'm currently using Git Fork with the ...
0
votes
0
answers
56
views
Stop folder from being merged
I have a git repository where I have a "prod" branch and a "dev" branch. I have a just_dev_folder
in dev which I want to completely exclude from prod and I want to be able to merge ...
0
votes
1
answer
168
views
Why do some merged commits have no effect?
Here is my workflow with git:
A 'master' branch.
A 'devel' branch, that I merge into master when it is mature for a new release.
Several little branches, such as 'imprimerie', 'ordomatic', etc.
...