Skip to content

Commit 7b631bd

Browse files
committed
Does important work
1 parent 3f11044 commit 7b631bd

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

docs/basics.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
layout: default
33
title: 2 - Git Basics
44
nav_order: 4
5-
last_modified_date: "2025-04-28 02:13AM"
5+
last_modified_date: "2026-03-10 02:13AM"
66
---
77

88
# Git Basics
@@ -22,15 +22,15 @@ This page covers the most essential commands when tracking your code using `git`
2222

2323
## Diff
2424

25-
Git was designed to track changes made to files and their location within a project. `git diff` is one of the best ways to see how things have actually changed. `git diff` is a function that takes two input data sets and outputs the changes between them.
25+
Git was designed to track changes made to files and their location within a project. `git diff` is one of the best ways to see how things have actually changed. `git diff` is a function that takes two input data sets and outputs the changes between them. Typically this means examining the current version of a file and comparing it to the tracked version in `git`.
2626

2727
For example, imagine that you have cleaned up your code a bit, added some new functionality, and inserted more comments inline. But you step away from your desk (or go to sleep or it's suddenly the weekend) and you need a reminder of what changes have been made to file before you add and commit it? `git diff` can tell you.
2828

2929
A command like this:
3030
```
3131
git diff filename.py
3232
```
33-
will show you a detailed inventory of inserted lines (which start with `+` and are highlighted in blue), deleted lines (which start with `-` and are highlighted in red) for the entire file.
33+
will show you a detailed inventory of inserted lines (which start with `+` and are highlighted in blue), deleted lines (which start with `-` and are highlighted in red) for a single file.
3434

3535
Or if you need to compare the structure of two directories:
3636
```
@@ -178,8 +178,8 @@ How is `fetch` different from `pull`? Pulling updates the HEAD of your repositor
178178
179179

180180
{: .important }
181-
**How are `pull` and `fetch` different or similar?**
182-
**`git fetch`** downloads changes from the remote and stores them in your remote-tracking branches (like `origin/main`), but leaves your working branch and local files completely untouched. You're essentially saying "show me what's out there" — you can then inspect the changes before deciding what to do with them.
181+
**How are `pull` and `fetch` different or similar?**<br /><br />
182+
**`git fetch`** downloads changes from the remote and stores them in your remote-tracking branches (like `origin/main`), but leaves your working branch and local files completely untouched. You're essentially saying "show me what's out there" — you can then inspect the changes before deciding what to do with them.<br /><br />
183183
**`git pull`** does a fetch and then immediately merges (or rebases, if configured) the fetched changes into your current branch. It's the two-step process collapsed into one command — convenient, but it can introduce merge commits or conflicts without you explicitly deciding to merge.
184184

185185

0 commit comments

Comments
 (0)