3,459 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-1
votes
0
answers
178
views
Git merge conflict on identical lines (invisible differences) [closed]
I am encountering a frustrating issue where Git flags merge conflicts on lines that appear to be 100% identical.
Even with my editor's "Show Whitespace" setting turned on, the lines look ...
-3
votes
0
answers
74
views
Never got "Merge remote-tracking branch 'refs/remotes/origin/master'" until recently [closed]
I've got two git working repos and a bare repo. I'm doing development on the "dev-site" repo, which has "master" and "dev" branches. Developing on "dev", ...
4
votes
3
answers
151
views
What should be done if Git creates and pushes an empty merge commit, and how can it be reverted?
I was merging one branch into another:
git checkout dev_auto_routing_fn
git merge developer
Git reported merge conflicts, which I resolved in the working tree.
While creating the merge commit, git ...
1
vote
2
answers
104
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
117
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
68
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
60
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
119
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
89
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
192
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
789
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
88
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 ...