2,245 questions
2
votes
1
answer
90
views
Git rebase file content messed up
Environment:
Local machine: Linux 16.1
Repository member: Visual Studio 2022 (Win11)
Today I merged a team member’s PR into master. This member modified file B. After the PR, the master branch’s graph ...
-1
votes
2
answers
127
views
Git fixup after a merge with upsteam
Scenario:
work... work... work... git commit -m "Step1"
work... work... work... git commit -m "Step2"
work... work... work... git commit -m "Step3"
git pull # merge a ...
3
votes
1
answer
107
views
When removing a file from history, what makes it still left in tree?
I have a private file that leaks into the repo, and I want to delete it. Here are the commits I suppose that it is first added:
git log --follow --diff-filter=A --find-renames=40% --pretty=reference --...
-2
votes
2
answers
61
views
How can I rebase a Git branch as though a file was never changed? [duplicate]
Let's say I have the following text file:
fruits.txt
apple
mango
pear
That's the state of the file as-is at the HEAD. The file was last altered 2 commits ago. Before that commit the file read:
...
1
vote
1
answer
46
views
How to rebase a git branch that contains a merge commit *and* corresponding, previous branch-point
I am trying to interactively rebase commits from the branch tmp/20241220-rebase-source onto tmp/20241220-rebase-target.
The commits to rebase include a branching point and corresponding merge-commit (...
0
votes
3
answers
84
views
git merge changes after previous merge
I have worked on a branch, and successfully merged my changes. After that I did another commit and want to merge it as well. However when I create pull request, it offers to merge the whole branch and ...
8
votes
1
answer
253
views
Git squash commits in middle of branch with child branches after that
I have the following repo:
A--B--C--D--E--F--G--H--I--J
\
K--L--M
main -> J
DEV -> M
I want to squash the commits between B and E so the repo looks like ...
0
votes
2
answers
115
views
After merge to master, rebase with master giving conflicts for all files merged to master
Case
A new branch created for given requirement
Adding changes as per requirement in the branch and
Below commands executed every time we commit
git add .
git commit -m "comment" (...