New answers tagged

1

When you squash a commit, it is squashed into the previous non-squashed commit. You're marking the very first commit in the list as a commit to be squashed, so there's no prior non-squashed commit to squash it into. It's a bit like starting a new repository and using git commit --amend before you've made your first commit. You need: pick this commit squash ...


0

First you have to find the revision where the file was deleted. You can do that with magit-log, then advice the full file name in "Limit to files". You will get the commit where the file was removed at the top of the log buffer. You can open file as it was just before deleted with magit-find-file, settings revision to rev^ where rev is the commit ...


1

You can use magit-file-checkout on the commit hash of your interest, or find the command (most likely f file) in Reset menu. After selecting the commit hash, choose the file you wanna resurrect.


12

Is it possible to make Git aware of how to identify a useful line to use for the @@ line? Yes, quoth section "Defining a custom hunk-header" in man 5 gitattributes: Defining a custom hunk-header Each group of changes (called a "hunk") in the textual diff output is prefixed with a line of the form: @@ -k,l +n,m @@ TEXT ...


Top 50 recent answers are included