Skip to content

Commit

Permalink
Dark mode and style the post page
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneikennedy committed Mar 15, 2024
1 parent 92346d3 commit 62804fc
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 96 deletions.
38 changes: 20 additions & 18 deletions content/git-rebase-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
Description: Learn how to git rebase interactively
Title: Interactive git rebase
---
# Learn how to harness the power of git's interactive rebase, a command that let's you alter the commit history with full control

Imagine you have *this* feature _branch_ with 5 **commits**:
## Learn how to harness the power of git's interactive rebase, a command that let's you alter the commit history with full control

``` text
Imagine you have _this_ feature _branch_ with 5 **commits**:

```text
* 02a7e84ccee - (HEAD -> billing, origin/billing) Fail gracefully if unknown error (8 hours ago)
* 8647daf1a2f - Add R0801 to pylint ignore list (8 hours ago)
* 1c5d459147a - Don't use BaseException anywhere (8 hours ago)
Expand All @@ -24,15 +25,16 @@ You've put the work in to reflect incremental units of change, each with their o
What we could do is create a commit that fixes the typo, handles the edge case and adds a test called "Update with PR feedback", but I'm here to tell you that we can do better than that. A commit that fixes mistakes that were introduced in this PR does not make any sense. In the git history we would just prefer that these mistakes never existed at all. So let me propose a different way:

Let's add a new commit for each fix we make
* Fix typo
* Handle edge case
* Add test

These are bad commit messages but you'll see why in a second. Further, let's say we know that the typo happened in "d8d58d1f055 - Update event service client with billing logic", the edge case was missed in "d783109d594 - Raise insuffient data exceptions", and that you missed a test in "62de8bb854d - Send billing events".
- Fix typo
- Handle edge case
- Add test

These are bad commit messages but you'll see why in a second. Further, let's say we know that the typo happened in "d8d58d1f055 - Update event service client with billing logic", the edge case was missed in "d783109d594 - Raise insuffient data exceptions", and that you missed a test in "62de8bb854d - Send billing events".

So now our commit history looks like this :

``` text
```text
* da7f3059367 - (HEAD -> billing) Add test (1 second ago)
* e62d6fd4bab - Handle edge case (38 seconds ago)
* 01507911dfd - Fix typo (2 minutes ago)
Expand All @@ -44,7 +46,7 @@ So now our commit history looks like this :
* d8d58d1f055 - Update event service client with billing logic (8 hours ago)
```

What we're going to do here is combine, or fixup, these small fixes with the commit where the problem was introduced; this means I'm going to combine "01507911dfd - Fix typo (2 minutes ago)" with "d8d58d1f055 - Update event service client with billing logic" and so on.
What we're going to do here is combine, or fixup, these small fixes with the commit where the problem was introduced; this means I'm going to combine "01507911dfd - Fix typo (2 minutes ago)" with "d8d58d1f055 - Update event service client with billing logic" and so on.

#### Rebase recap

Expand All @@ -58,7 +60,7 @@ I have 9 commits in this branch, which means the base that I want is 10 commits

`git rebase -i HEAD~9`

``` text
```text
pick d8d58d1f055 Update event service client with billing logic
pick d783109d594 Raise insuffient data exceptions
pick 62de8bb854d Send billing events
Expand Down Expand Up @@ -104,20 +106,20 @@ This is what you should see in your git commit editor. Let me point out some int

Looking at the descriptions for each command:

* Pick - "use commit" this means leave it as is
* Reword - don't like the commit message you used?
* Edit - forgot something on this commit?
* Squash - "meld" into previous commit (this is what we want to do)
* Fixup - same as squash, but use the first commit's message (this is also what we want, and what we'll use because I like the commit messages I made initially)
* ...
- Pick - "use commit" this means leave it as is
- Reword - don't like the commit message you used?
- Edit - forgot something on this commit?
- Squash - "meld" into previous commit (this is what we want to do)
- Fixup - same as squash, but use the first commit's message (this is also what we want, and what we'll use because I like the commit messages I made initially)
- ...

You get the point, I find these first four to be the most used in my workflow but the other options are worth knowing about.

Back to our rebase!

I want to take my small fixup commits, and "meld" them onto the commit where they were introduced:

``` text
```text
pick cc449795730 Update event service client with billing logic
fixup bd8222bd083 Fix typo
pick a96ad17080a Raise insuffient data exceptions
Expand All @@ -135,7 +137,7 @@ Now save and close the file and run `git log --graph`

> --graph is a preference, use normal git log if you want
``` text
```text
* 9857802cbb1 - (HEAD -> billing) Fail gracefully if unknown error (5 seconds ago)
* 747321db1e0 - Add R0801 to pylint ignore list (6 seconds ago)
* cbd6a8442b7 - Don't use BaseException anywhere (6 seconds ago)
Expand Down
38 changes: 20 additions & 18 deletions content/git-rebase-tutorial2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
Description: Learn how to git rebase interactively
Title: Interactive git rebase
---
# Learn how to harness the power of git's interactive rebase, a command that let's you alter the commit history with full control

Imagine you have *this* feature _branch_ with 5 **commits**:
## Learn how to harness the power of git's interactive rebase, a command that let's you alter the commit history with full control

``` text
Imagine you have _this_ feature _branch_ with 5 **commits**:

```text
* 02a7e84ccee - (HEAD -> billing, origin/billing) Fail gracefully if unknown error (8 hours ago)
* 8647daf1a2f - Add R0801 to pylint ignore list (8 hours ago)
* 1c5d459147a - Don't use BaseException anywhere (8 hours ago)
Expand All @@ -24,15 +25,16 @@ You've put the work in to reflect incremental units of change, each with their o
What we could do is create a commit that fixes the typo, handles the edge case and adds a test called "Update with PR feedback", but I'm here to tell you that we can do better than that. A commit that fixes mistakes that were introduced in this PR does not make any sense. In the git history we would just prefer that these mistakes never existed at all. So let me propose a different way:

Let's add a new commit for each fix we make
* Fix typo
* Handle edge case
* Add test

These are bad commit messages but you'll see why in a second. Further, let's say we know that the typo happened in "d8d58d1f055 - Update event service client with billing logic", the edge case was missed in "d783109d594 - Raise insuffient data exceptions", and that you missed a test in "62de8bb854d - Send billing events".
- Fix typo
- Handle edge case
- Add test

These are bad commit messages but you'll see why in a second. Further, let's say we know that the typo happened in "d8d58d1f055 - Update event service client with billing logic", the edge case was missed in "d783109d594 - Raise insuffient data exceptions", and that you missed a test in "62de8bb854d - Send billing events".

So now our commit history looks like this :

``` text
```text
* da7f3059367 - (HEAD -> billing) Add test (1 second ago)
* e62d6fd4bab - Handle edge case (38 seconds ago)
* 01507911dfd - Fix typo (2 minutes ago)
Expand All @@ -44,7 +46,7 @@ So now our commit history looks like this :
* d8d58d1f055 - Update event service client with billing logic (8 hours ago)
```

What we're going to do here is combine, or fixup, these small fixes with the commit where the problem was introduced; this means I'm going to combine "01507911dfd - Fix typo (2 minutes ago)" with "d8d58d1f055 - Update event service client with billing logic" and so on.
What we're going to do here is combine, or fixup, these small fixes with the commit where the problem was introduced; this means I'm going to combine "01507911dfd - Fix typo (2 minutes ago)" with "d8d58d1f055 - Update event service client with billing logic" and so on.

#### Rebase recap

Expand All @@ -58,7 +60,7 @@ I have 9 commits in this branch, which means the base that I want is 10 commits

`git rebase -i HEAD~9`

``` text
```text
pick d8d58d1f055 Update event service client with billing logic
pick d783109d594 Raise insuffient data exceptions
pick 62de8bb854d Send billing events
Expand Down Expand Up @@ -104,20 +106,20 @@ This is what you should see in your git commit editor. Let me point out some int

Looking at the descriptions for each command:

* Pick - "use commit" this means leave it as is
* Reword - don't like the commit message you used?
* Edit - forgot something on this commit?
* Squash - "meld" into previous commit (this is what we want to do)
* Fixup - same as squash, but use the first commit's message (this is also what we want, and what we'll use because I like the commit messages I made initially)
* ...
- Pick - "use commit" this means leave it as is
- Reword - don't like the commit message you used?
- Edit - forgot something on this commit?
- Squash - "meld" into previous commit (this is what we want to do)
- Fixup - same as squash, but use the first commit's message (this is also what we want, and what we'll use because I like the commit messages I made initially)
- ...

You get the point, I find these first four to be the most used in my workflow but the other options are worth knowing about.

Back to our rebase!

I want to take my small fixup commits, and "meld" them onto the commit where they were introduced:

``` text
```text
pick cc449795730 Update event service client with billing logic
fixup bd8222bd083 Fix typo
pick a96ad17080a Raise insuffient data exceptions
Expand All @@ -135,7 +137,7 @@ Now save and close the file and run `git log --graph`

> --graph is a preference, use normal git log if you want
``` text
```text
* 9857802cbb1 - (HEAD -> billing) Fail gracefully if unknown error (5 seconds ago)
* 747321db1e0 - Add R0801 to pylint ignore list (6 seconds ago)
* cbd6a8442b7 - Don't use BaseException anywhere (6 seconds ago)
Expand Down
38 changes: 20 additions & 18 deletions content/git-rebase-tutorial3.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
Description: Learn how to git rebase interactively
Title: Interactive git rebase
---
# Learn how to harness the power of git's interactive rebase, a command that let's you alter the commit history with full control

## Learn how to harness the power of git's interactive rebase, a command that let's you alter the commit history with full control

![altttt](http://localhost:7878/static/screen-shot.png)
[text 1234 !](https://google.com)
Imagine you have *this* feature _branch_ with 5 **commits**:
Imagine you have _this_ feature _branch_ with 5 **commits**:

``` text
```text
* 02a7e84ccee - (HEAD -> billing, origin/billing) Fail gracefully if unknown error (8 hours ago)
* 8647daf1a2f - Add R0801 to pylint ignore list (8 hours ago)
* 1c5d459147a - Don't use BaseException anywhere (8 hours ago)
Expand All @@ -26,15 +27,16 @@ You've put the work in to reflect incremental units of change, each with their o
What we could do is create a commit that fixes the typo, handles the edge case and adds a test called "", but I'm here to tell you that we can do better than that. A commit that fixes mistakes that were introduced in this PR does not make any sense. In the git history we would just prefer that these mistakes never existed at all. So let me propose a different way:

Let's add a new commit for each fix we make
* Fix typo
* Handle edge case
* Add test

These are bad commit messages but you'll see why in a second. Further, let's say we know that the typo happened in "d8d58d1f055 - Update event service client with billing logic", the edge case was missed in "d783109d594 - Raise insuffient data exceptions", and that you missed a test in "62de8bb854d - Send billing events".
- Fix typo
- Handle edge case
- Add test

These are bad commit messages but you'll see why in a second. Further, let's say we know that the typo happened in "d8d58d1f055 - Update event service client with billing logic", the edge case was missed in "d783109d594 - Raise insuffient data exceptions", and that you missed a test in "62de8bb854d - Send billing events".

So now our commit history looks like this :

``` text
```text
* da7f3059367 - (HEAD -> billing) Add test (1 second ago)
* e62d6fd4bab - Handle edge case (38 seconds ago)
* 01507911dfd - Fix typo (2 minutes ago)
Expand All @@ -46,7 +48,7 @@ So now our commit history looks like this :
* d8d58d1f055 - Update event service client with billing logic (8 hours ago)
```

What we're going to do here is combine, or fixup, these small fixes with the commit where the problem was introduced; this means I'm going to combine "01507911dfd - Fix typo (2 minutes ago)" with "d8d58d1f055 - Update event service client with billing logic" and so on.
What we're going to do here is combine, or fixup, these small fixes with the commit where the problem was introduced; this means I'm going to combine "01507911dfd - Fix typo (2 minutes ago)" with "d8d58d1f055 - Update event service client with billing logic" and so on.

#### Rebase recap

Expand All @@ -60,7 +62,7 @@ I have 9 commits in this branch, which means the base that I want is 10 commits

`git rebase -i HEAD~9`

``` text
```text
pick d8d58d1f055 Update event service client with billing logic
pick d783109d594 Raise insuffient data exceptions
pick 62de8bb854d Send billing events
Expand Down Expand Up @@ -106,20 +108,20 @@ This is what you should see in your git commit editor. Let me point out some int

Looking at the descriptions for each command:

* Pick - "use commit" this means leave it as is
* Reword - don't like the commit message you used?
* Edit - forgot something on this commit?
* Squash - "meld" into previous commit (this is what we want to do)
* Fixup - same as squash, but use the first commit's message (this is also what we want, and what we'll use because I like the commit messages I made initially)
* ...
- Pick - "use commit" this means leave it as is
- Reword - don't like the commit message you used?
- Edit - forgot something on this commit?
- Squash - "meld" into previous commit (this is what we want to do)
- Fixup - same as squash, but use the first commit's message (this is also what we want, and what we'll use because I like the commit messages I made initially)
- ...

You get the point, I find these first four to be the most used in my workflow but the other options are worth knowing about.

Back to our rebase!

I want to take my small fixup commits, and "meld" them onto the commit where they were introduced:

``` text
```text
pick cc449795730 Update event service client with billing logic
fixup bd8222bd083 Fix typo
pick a96ad17080a Raise insuffient data exceptions
Expand All @@ -137,7 +139,7 @@ Now save and close the file and run `git log --graph`

> --graph is a preference, use normal git log if you want
``` text
```text
* 9857802cbb1 - (HEAD -> billing) Fail gracefully if unknown error (5 seconds ago)
* 747321db1e0 - Add R0801 to pylint ignore list (6 seconds ago)
* cbd6a8442b7 - Don't use BaseException anywhere (6 seconds ago)
Expand Down
Binary file added static/screen-shot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 62804fc

Please sign in to comment.