Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
64 views

Say I have four commits A, B, C and D, with A being an ancestor of B and C being an ancestor of D. I now want to verify that the changes from A to B are the same as the changes from C to D (or show ...
Caulder's user avatar
  • 459
-2 votes
1 answer
70 views

I believe the two functions below is the same. But AI keep telling me they are different (that I think AI is wrong). get_changed_files() { local staged_files committed_files staged_files=$(git ...
Elye's user avatar
  • 61.3k
-2 votes
2 answers
131 views

I want to prompt users in the documentation to directly review the message of a specific commit. So, I’d like to use the git diff command, as shown below: git --no-pager diff 0847759b^:path/a.cpp ...
Carson's user avatar
  • 8,880
0 votes
1 answer
119 views

I have a the following piece of code in my git repo (using git version 2.33.0.windows.2): int foo = 0; // foo is set in some manner if (foo == 1) { DoA(); DoB(); DoC(); DoD(); } if (...
Frank's user avatar
  • 2,788
0 votes
1 answer
120 views

I have recently learned that git diff --cached shows how the new commit during an interactive rebase conflict after resolving the conflict looks. What does git diff compare during resolving a git ...
lmixa's user avatar
  • 79
1 vote
0 answers
27 views

I've been spoiled by GUI diff tools like meld, kdiff3 etc. Now I'm stuck having to do some git diff'ing via a terminal. If I: git difftool --tool=vimdiff HEAD~ I get pairs of files which need to be ...
einpoklum's user avatar
  • 137k
0 votes
1 answer
133 views

We use a common git strategy: branch from main to a feature branch. do commits in feature. if main progresses, merge it to feature. merge feature to main. I want to view the changes that happened ...
l000p's user avatar
  • 334
0 votes
1 answer
99 views

This question shows many good ways to use git-mergetool to show the condition of files before a merge commit using meld: Setting up and using Meld as your Git difftool and mergetool I like the three-...
Britton Kerin's user avatar
-2 votes
3 answers
210 views

I have a quite subtle script that's trying to patch differences from a formatted version of a text file to a "legacy" unformatted version. To help avoid issues with extraneous diffs due to ...
David Beaumont's user avatar
0 votes
1 answer
51 views

I am running a diff between 2 consecutive commits and the only change between them is a rename of one file without any change in content involved. If I run a show on the parent commit, I get this from ...
eftshift0's user avatar
  • 31.5k
0 votes
0 answers
71 views

This is for a javascript app, so no UI needed. My goal is to get stats of changes between 2 commits, basically exactly what git diff --numstat does, but also, along with the additions and deletions ...
user30020824's user avatar
-5 votes
1 answer
151 views

I thought I was beginning to understand git diff. But today I did a git diff between a commit at the tip of one branch ("A") with a commit at the tip of another ("B"), where B is a ...
mike rodent's user avatar
  • 16.1k
2 votes
2 answers
198 views

I want to see the changes of git diff as a directory/tree list in VS Code. I remember it used to be there earlier in the git section of editor, but I don't see that anymore. Anyone knows how it can be ...
Srajan Gupta's user avatar
0 votes
2 answers
58 views

I need the diff (changes based on the words) between these two simple lines: <h1>Intro line 06.03.2004</h1> and: <h1>Intro line 15.08.2024</h1> The comparison command: git ...
thomas.mc.work's user avatar
0 votes
0 answers
77 views

If I do the following: git config diff.algorithm patience git add -p then git add -p forms its diffs using the patience algorithm. Is there any way to force git add -p to use patience as a one-off ...
LSpice's user avatar
  • 140
1 vote
0 answers
56 views

I'm writing a patch for my code which mainly replaces contents within lines. I want the git diff --stat (and later git log --stat) to show me the numbers of characters, rather than lines, added or ...
einpoklum's user avatar
  • 137k
0 votes
0 answers
72 views

I'm having a problem with Git merge. In short, I'm merging the master branch into a feature branch, essentially git checkout feature && git merge master. This is how it looks graphically: ...
d.k's user avatar
  • 4,500
2 votes
1 answer
94 views

I would like a way to log certain commits and also submit path arguments so that the diff on those paths, if any, is shown for each commit as if those path arguments were supplied like git diff -- <...
H.v.M.'s user avatar
  • 1,746
1 vote
2 answers
118 views

When the two commits are the same, git diff generates no result. However, is there a way to make it output some text, such as "no difference in commit1 and commit2"? this is to help identify ...
athos's user avatar
  • 6,517
1 vote
1 answer
114 views

I want to supply my linter tool with files that changed in my branch. The list should include: files committed in my branch since branched from its parent files changed and staged files changed but ...
Lode's user avatar
  • 2,182
1 vote
1 answer
218 views

After doing a merge which includes changes of a coworker, I want to them, to outline wheat each of us changed and how I resolved the conflicts. The standard way that git displays merges, however, is ...
akraf's user avatar
  • 3,285
1 vote
0 answers
46 views

During a merge with git 2.42.0.windows.2 and the Bash console, I had to manually perform some modifications to get it to compile, which I then committed along with the modifications due to the merge ...
Charles's user avatar
  • 1,329
1 vote
0 answers
70 views

I have a file A on branch old_branch that exists as multiple files A, B, C on a different branch new_branch. I need to merge old_branch into new_branch which would require me to resolve the merge ...
Andr0id16's user avatar
0 votes
1 answer
322 views

In VS Code, on Source Control view at left, you can see incoming changes grouped by commits. You can explore commits, see changed files, and examine individual changes. In IntelliJ IDEA, there seems ...
DimaA6_ABC's user avatar
0 votes
1 answer
104 views

I've been trying to make my git diff output nicer. Mainly I want side-by-side output, and so, I went with git-delta. Everything has been working great, but there is only one problem: git diff output ...
dxo's user avatar
  • 11

1
2 3 4 5
24