Linked Questions

3384 votes
35 answers
1.5m views

How do I make git use the editor of my choice for editing commit messages?

How do I globally configure git to use a particular editor (e.g. vim) for commit messages?
brasskazoo's user avatar
  • 77.9k
3903 votes
27 answers
2.5m views

View the change history of a file using Git versioning

How do I view the history of an individual file with complete details of what has changed? git log -- [filename] shows me the commit history of a file, but how do I see the file content that changed?
Richard's user avatar
  • 40.5k
727 votes
18 answers
586k views

What's the best visual merge tool for Git? [closed]

What's the best tool for viewing and editing a merge in Git? I'd like to get a 3-way merge view, with "mine", "theirs" and "ancestor" in separate panels, and a fourth "output" panel. Also, ...
andy's user avatar
  • 18.2k
415 votes
10 answers
325k views

Setting up and using Meld as your Git difftool and mergetool

There are a lot of different programs that can be used as your Git difftool and mergetool, and there certainly isn't any consensus as to which is the best (opinions, requirements, and OSes will ...
mattst's user avatar
  • 13.8k
266 votes
19 answers
177k views

How can I get a side-by-side diff when I do "git diff"?

When I type git diff, I'd like to see a side-by-side diff, like with diff -y, or like to display the diff in an interactive diff tool like kdiff3. How can this be done?
user avatar
280 votes
5 answers
51k views

What are the differences between double-dot ".." and triple-dot "..." in Git diff commit ranges?

What are the differences between the following commands?: git diff foo master # a git diff foo..master # b git diff foo...master # c The diff manual talks about it: Comparing branches $ git ...
chrisjlee's user avatar
  • 22.5k
240 votes
7 answers
110k views

Git diff to show only lines that have been modified

When I do a git diff, it shows lines that have been added: + this line is added lines that have been removed: - this line is removed but it also shows many lines which are not modified: this line is ...
r3b00t's user avatar
  • 7,433
25 votes
8 answers
8k views

Is there git blame gui similar to bzr qannotate? [closed]

As a former bzr user and novice to git I'm trying to find good GUI tool for git blame similar to bzr qannotate. The latter has 2 major views: file content viewer with short annotate information (who, ...
bialix's user avatar
  • 20.9k
19 votes
5 answers
25k views

Git Diff and Meld on Windows

Has anyone ever made Meld work with Git on Windows? I am trying to make it work and I have no success. I have Meld installed and when I call it from the command line with two files as parameters it ...
Jacob Krieg's user avatar
  • 3,044
0 votes
1 answer
2k views

How to resolve all merge conflicts in a git revert so that only the HEAD (current change) changes are committed to the branch

I recently created a branch off master to revert a very large commit. I first created a branch off master then, I used git revert "commit tag from gitlab", but I have a lot of merge ...
nkhalid's user avatar
1 vote
3 answers
336 views

Force merge file by file - git

I have just merged two branches 'branch1' and 'branch2'. The problem is that it is now a mess with a lot of conflicts, with sometimes duplicate contents (is it possible ??). What I want to do is to ...
epsilones's user avatar
  • 11.5k
1 vote
2 answers
197 views

Git command to prevent rebase from completing without letting me check the changes first

I would like to rebase my commit onto the latest in the develop branch. But, before everything is committed after the rebase, I want to review every file and check if it is correctly rebased or not. ...
Lani's user avatar
  • 31