feat: split out git blame
This commit is contained in:
@@ -8,7 +8,6 @@ In this module, you will:
|
||||
- Use `git show` to view specific commit details
|
||||
- Use `git diff` to compare changes between commits
|
||||
- Use `git diff --staged` to view changes ready to be committed
|
||||
- Use `git blame` to find who made specific changes
|
||||
- Understand commit hashes and references
|
||||
- Discover how `git diff` reveals changes not visible in current files
|
||||
|
||||
@@ -31,7 +30,6 @@ You'll explore an existing Git repository that contains multiple commits. Your g
|
||||
- Examining changes between specific commits
|
||||
- Understanding staged changes
|
||||
- **Finding a secret code hidden in the commit history!** (Only discoverable by using `git diff`)
|
||||
- **Tracking down who made a suspicious code change** (Using `git blame`)
|
||||
|
||||
The setup script will create an `answers.md` file in the challenge directory with questions for you to answer. Fill in your answers directly in that file.
|
||||
|
||||
@@ -45,8 +43,7 @@ The setup script will create an `answers.md` file in the challenge directory wit
|
||||
6. Try different log formats: `git log --stat`, `git log --graph`
|
||||
7. View specific commits: `git show <commit-hash>`
|
||||
8. Compare specific commits: `git diff <commit1> <commit2> <file>`
|
||||
9. Use `git blame` to find who wrote specific lines: `git blame -e <file>`
|
||||
10. Fill in your answers in `answers.md`
|
||||
9. Fill in your answers in `answers.md`
|
||||
|
||||
> **Important Notes:**
|
||||
> - You can use any Git commands you like to explore the repository
|
||||
@@ -207,19 +204,6 @@ git diff HEAD # Show all changes (staged + unstaged) vs last c
|
||||
- `git diff HEAD` - See all your changes since the last commit
|
||||
- `git diff <commit1> <commit2>` - Compare any two points in history
|
||||
|
||||
### Finding Who Changed What with git blame
|
||||
|
||||
```bash
|
||||
git blame <file> # Show who last modified each line
|
||||
git blame -e <file> # Show with email addresses
|
||||
git blame -L 10,20 <file> # Blame specific line range (lines 10-20)
|
||||
```
|
||||
|
||||
**When to use `git blame`:**
|
||||
- Find who wrote a specific line of code
|
||||
- Identify when a bug was introduced
|
||||
- Understand the context/reason for a change by finding the author
|
||||
|
||||
## Verification
|
||||
|
||||
Once you've filled in your answers in `answers.md`, verify your solution:
|
||||
|
||||
Reference in New Issue
Block a user