You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, first of all thanks for the software carpentry git lesson. I think it is already great and I only have a minor remark/improvement. In the chapter https://swcarpentry.github.io/git-novice/05-history/index.html there is the part where a diff is done not against a relative commit from HEAD but using a commit ID. It further states that the 40 digit hash is hard to type and it would be sufficient to use the first 7 characters.
In general, I feel that the sentence should not start with "That's the right answer, ...", since there was never a question before. Further, I think at this point it would be helpful to revisit the git log --oneline feature, which was named in the lesson before as an additional feature to reduce the log information. But in addition, it shows the short IDs.
So my suggestion would be:
Great, now we see how the very first version of mars.txt differs from the current one (the HEAD). But typing out random 40-character strings is annoying, so Git lets us use just the first few characters (typically seven for normal size projects). To quickly get the short ID we can also use the command git log --oneline and copy the ID from the respective commit.
Please, let me know if this is helpful or should be further revised. I am happy to make a PR for this as well.
Many thanks.
The text was updated successfully, but these errors were encountered:
Hello, @rrahn. Thank you for your comments. I'm fairly certain that the sentence, "That's the right answer" is more of a "Thankfully, that's the right answer" and in relation to having correctly typed out the 40-character string. Remember, the changes were already shown and described when the command git diff HEAD~3 mars.txt was run, so the first sentence in your suggestion repeats that. This section focuses on showing different ways of exploring history.
Also in terms of your rewrite, not all systems allow users to copy/paste from the command-line, so using the git log --oneline to "copy the ID" doesn't help everyone. Perhaps what can be added is an additional sentence after "(typically seven for normal size projects)"
The command git log --oneline also shows shortened identifiers.
As an aside: stemming from learner questions in some workshops, we've had fun during this section by testing to see how short of an ID will work, while explaining that all Git is looking for is a unique identifier, so you can use the shortest unique identifier to refer to any particular commit.
Hi, first of all thanks for the software carpentry git lesson. I think it is already great and I only have a minor remark/improvement. In the chapter https://swcarpentry.github.io/git-novice/05-history/index.html there is the part where a diff is done not against a relative commit from HEAD but using a commit ID. It further states that the 40 digit hash is hard to type and it would be sufficient to use the first 7 characters.
In general, I feel that the sentence should not start with "That's the right answer, ...", since there was never a question before. Further, I think at this point it would be helpful to revisit the
git log --oneline
feature, which was named in the lesson before as an additional feature to reduce the log information. But in addition, it shows the short IDs.So my suggestion would be:
Great, now we see how the very first version of mars.txt differs from the current one (the HEAD). But typing out random 40-character strings is annoying, so Git lets us use just the first few characters (typically seven for normal size projects). To quickly get the short ID we can also use the command git log --oneline and copy the ID from the respective commit.
Please, let me know if this is helpful or should be further revised. I am happy to make a PR for this as well.
Many thanks.
The text was updated successfully, but these errors were encountered: