Ask Your Question
3

What is the method to make Github use `git diff ..` instead of `git diff ...`?

asked 2023-06-13 16:37:56 +0000

huitzilopochtli gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-06-13 16:57:02 +0000

david gravatar image

To make Github use git diff .. instead of git diff ..., you can add the flag --no-renames to the git diff command. This flag disables the detection and renaming of files, which is usually the difference between .. and ... in the Git command history. To use this flag in Github, simply modify the URL of the diff view to include the flag, like so:

https://github.com/[user]/[repo]/compare/[branch]?diff=split&name=[commit]&title=Some%20title&body=@[user]%20Some%20comment%0A%0A--no-renames

This URL will open the diff view for the specified branch and commit, but without detecting any file renames. You can also modify the diff view by clicking the "File" dropdown and selecting "Diff settings", then checking the "Simplified" option. This will also disable file rename detection and use .. instead of ... in the Git command history.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-06-13 16:37:56 +0000

Seen: 15 times

Last updated: Jun 13 '23