From 298ba9abe40f17a7d2882c07032ce700390348eb Mon Sep 17 00:00:00 2001 From: "Rahul A. Krishna" Date: Tue, 31 Oct 2023 18:07:49 +0530 Subject: [PATCH] fix loom videos --- ...123f71df971bbeee282a701502dc0a02cfe84fbdae | 113 ++++++++++++++++++ ...79dbff68be1208542073d63834d7f2d5e11e2c0ffb | 113 ++++++++++++++++++ ...5eb278f7a112163262d67a83e84c1a041b0e687942 | 113 ++++++++++++++++++ _posts/2023-10-31-stash-as-a-commit.markdown | 4 +- _site/blog/2023/10/31/stash-as-a-commit.html | 4 +- _site/feed.xml | 6 +- 6 files changed, 346 insertions(+), 7 deletions(-) create mode 100644 .jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/36/13dde1c547e9fd654bcc123f71df971bbeee282a701502dc0a02cfe84fbdae create mode 100644 .jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/ba/5f3f3a4d7547285540fa79dbff68be1208542073d63834d7f2d5e11e2c0ffb create mode 100644 .jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/be/f967ca2de758816be2235eb278f7a112163262d67a83e84c1a041b0e687942 diff --git a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/36/13dde1c547e9fd654bcc123f71df971bbeee282a701502dc0a02cfe84fbdae b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/36/13dde1c547e9fd654bcc123f71df971bbeee282a701502dc0a02cfe84fbdae new file mode 100644 index 0000000..6858d25 --- /dev/null +++ b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/36/13dde1c547e9fd654bcc123f71df971bbeee282a701502dc0a02cfe84fbdae @@ -0,0 +1,113 @@ +I"

Stash as a Commit

+ +

Date: October 31, 2023

+ +

What is a Stash?

+ +
+ +

From Julia Evans’ blog article titled Some miscellaneous git facts

+ +
+

👉🏽 **the stash is a bunch of commits**

+ +

When I run git stash to stash my changes, I’ve always been a bit confused about where those changes actually went. It turns out that when you run git stash, git makes some commits with your changes and labels them with a reference called stash (in .git/refs/stash).

+ +

Let’s stash this blog post and look at the log of the stash reference:

+ +
$ git log stash --oneline
+6cb983fe (refs/stash) WIP on main: c6ee55ed wip
+2ff2c273 index on main: c6ee55ed wip
+... some more stuff
+
+
+ +

Now we can look at the commit 2ff2c273 to see what it contains:

+ +
$ git show 2ff2c273  --stat
+commit 2ff2c273357c94a0087104f776a8dd28ee467769
+Author: Julia Evans <julia@jvns.ca>
+Date:   Fri Oct 20 14:49:20 2023 -0400
+
+   index on main: c6ee55ed wip
+
+content/post/2023-10-20-some-miscellaneous-git-facts.markdown | 40 ++++++++++++++++++++++++++++++++++++++++
+
+
+ +

Unsurprisingly, it contains this blog post. Makes sense!

+ +

git stash actually creates 2 separate commits: one for the index, and one for your changes that you haven’t staged yet. I found this kind of heartening because I’ve been working on a tool to snapshot and restore the state of a git repository (that I may or may not ever release) and I came up with a very similar design, so that made me feel better about my choices.

+ +

Apparently older commits in the stash are stored in the reflog.

+
+ +

Why can’t we just commit instead of stashing?

+ +
+ +

For those used to the idea of git from command line, this may seem like a strange idea. But if your git workflow is well integrated into your IDE (I must admit, I have only VS Code in mind here), then this is such a good idea.

+ +

The Atom UI

+ +

I absolutely adored the Atom UI. The best part to me was the three pane design that put File Explorer, Code and Git in view always.

+ +

The Atom UI with File Explorer, Code Area and Git/Github Panel

+ +

The Atom UI with File Explorer, Code Area and Git/Github Panel

+ +

This is good because as you went making changes in files, it kept adding a list item in the right side of the screen and you had a general idea how big your changes were becoming. Putting this upfront meant a little extra motivation to go and make experimental changes anywhere which never left your view and you could just go and cherry-pick or discard everything!

+ +

Atom Git Pane

+ +

Atom Git Pane

+ +

The Flow in Atom

+ +
+ +

Let’s say you’re in feature-branch-1 and you need to switch branches to master. Naturally, you’ll stash your changes in feature-branch-1

+ +

Here’s the alternative commit method in Atom.

+ +
+ +

What about VS Code?

+ +
+ +

VS Code doesn’t come with the same layout by default. It’s for the better and you can have the same Atom-like workflow in VS Code. Just enable a Secondary Side Bar and drag your “Source Control” and “Commits” to the second pane.

+ +

Untitled

+ +

A lot more cluttered than my Atom. But it also does a lot more than Atom!

+ +

A lot more cluttered than my Atom. But it also does a lot more than Atom!

+ +

The Same Flow in VS Code

+ +
+ +
+ +

The Advantage

+ +
+ +

The real advantage is that a stash commit is local to a branch. This is ideal if you’re often working on multiple features and need to stash something to switch branches (often to master to create a new branch). So when you come back you see the stash commit and you’re back where you left it. Sometimes, when a week later when you revisit a branch, remembering that you stashed some code is not clear.

+ +

The case for stash

+ +
+ + + +

References

+ +
+ +

Julia Evans’ Blog Article: https://jvns.ca/blog/2023/10/20/some-miscellaneous-git-facts/

+:ET \ No newline at end of file diff --git a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/ba/5f3f3a4d7547285540fa79dbff68be1208542073d63834d7f2d5e11e2c0ffb b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/ba/5f3f3a4d7547285540fa79dbff68be1208542073d63834d7f2d5e11e2c0ffb new file mode 100644 index 0000000..6d16107 --- /dev/null +++ b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/ba/5f3f3a4d7547285540fa79dbff68be1208542073d63834d7f2d5e11e2c0ffb @@ -0,0 +1,113 @@ +I"x

Stash as a Commit

+ +

Date: October 31, 2023

+ +

What is a Stash?

+ +
+ +

From Julia Evans’ blog article titled Some miscellaneous git facts

+ +
+

👉🏽 **the stash is a bunch of commits**

+ +

When I run git stash to stash my changes, I’ve always been a bit confused about where those changes actually went. It turns out that when you run git stash, git makes some commits with your changes and labels them with a reference called stash (in .git/refs/stash).

+ +

Let’s stash this blog post and look at the log of the stash reference:

+ +
$ git log stash --oneline
+6cb983fe (refs/stash) WIP on main: c6ee55ed wip
+2ff2c273 index on main: c6ee55ed wip
+... some more stuff
+
+
+ +

Now we can look at the commit 2ff2c273 to see what it contains:

+ +
$ git show 2ff2c273  --stat
+commit 2ff2c273357c94a0087104f776a8dd28ee467769
+Author: Julia Evans <julia@jvns.ca>
+Date:   Fri Oct 20 14:49:20 2023 -0400
+
+   index on main: c6ee55ed wip
+
+content/post/2023-10-20-some-miscellaneous-git-facts.markdown | 40 ++++++++++++++++++++++++++++++++++++++++
+
+
+ +

Unsurprisingly, it contains this blog post. Makes sense!

+ +

git stash actually creates 2 separate commits: one for the index, and one for your changes that you haven’t staged yet. I found this kind of heartening because I’ve been working on a tool to snapshot and restore the state of a git repository (that I may or may not ever release) and I came up with a very similar design, so that made me feel better about my choices.

+ +

Apparently older commits in the stash are stored in the reflog.

+
+ +

Why can’t we just commit instead of stashing?

+ +
+ +

For those used to the idea of git from command line, this may seem like a strange idea. But if your git workflow is well integrated into your IDE (I must admit, I have only VS Code in mind here), then this is such a good idea.

+ +

The Atom UI

+ +

I absolutely adored the Atom UI. The best part to me was the three pane design that put File Explorer, Code and Git in view always.

+ +

The Atom UI with File Explorer, Code Area and Git/Github Panel

+ +

The Atom UI with File Explorer, Code Area and Git/Github Panel

+ +

This is good because as you went making changes in files, it kept adding a list item in the right side of the screen and you had a general idea how big your changes were becoming. Putting this upfront meant a little extra motivation to go and make experimental changes anywhere which never left your view and you could just go and cherry-pick or discard everything!

+ +

Atom Git Pane

+ +

Atom Git Pane

+ +

The Flow in Atom

+ +
+ +

Let’s say you’re in feature-branch-1 and you need to switch branches to master. Naturally, you’ll stash your changes in feature-branch-1

+ +

Here’s the alternative commit method in Atom.

+ + + +

What about VS Code?

+ +
+ +

VS Code doesn’t come with the same layout by default. It’s for the better and you can have the same Atom-like workflow in VS Code. Just enable a Secondary Side Bar and drag your “Source Control” and “Commits” to the second pane.

+ +

Untitled

+ +

A lot more cluttered than my Atom. But it also does a lot more than Atom!

+ +

A lot more cluttered than my Atom. But it also does a lot more than Atom!

+ +

The Same Flow in VS Code

+ +
+ +

https://www.loom.com/share/a1fa5c8bebd74fb889ae26dbbfcf63ee?sid=386b9b4e-44e3-4eec-80ab-1e5987b35dad

+ +

The Advantage

+ +
+ +

The real advantage is that a stash commit is local to a branch. This is ideal if you’re often working on multiple features and need to stash something to switch branches (often to master to create a new branch). So when you come back you see the stash commit and you’re back where you left it. Sometimes, when a week later when you revisit a branch, remembering that you stashed some code is not clear.

+ +

The case for stash

+ +
+ + + +

References

+ +
+ +

Julia Evans’ Blog Article: https://jvns.ca/blog/2023/10/20/some-miscellaneous-git-facts/

+:ET \ No newline at end of file diff --git a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/be/f967ca2de758816be2235eb278f7a112163262d67a83e84c1a041b0e687942 b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/be/f967ca2de758816be2235eb278f7a112163262d67a83e84c1a041b0e687942 new file mode 100644 index 0000000..bb8ff1f --- /dev/null +++ b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/be/f967ca2de758816be2235eb278f7a112163262d67a83e84c1a041b0e687942 @@ -0,0 +1,113 @@ +I"

Stash as a Commit

+ +

Date: October 31, 2023

+ +

What is a Stash?

+ +
+ +

From Julia Evans’ blog article titled Some miscellaneous git facts

+ +
+

👉🏽 **the stash is a bunch of commits**

+ +

When I run git stash to stash my changes, I’ve always been a bit confused about where those changes actually went. It turns out that when you run git stash, git makes some commits with your changes and labels them with a reference called stash (in .git/refs/stash).

+ +

Let’s stash this blog post and look at the log of the stash reference:

+ +
$ git log stash --oneline
+6cb983fe (refs/stash) WIP on main: c6ee55ed wip
+2ff2c273 index on main: c6ee55ed wip
+... some more stuff
+
+
+ +

Now we can look at the commit 2ff2c273 to see what it contains:

+ +
$ git show 2ff2c273  --stat
+commit 2ff2c273357c94a0087104f776a8dd28ee467769
+Author: Julia Evans <julia@jvns.ca>
+Date:   Fri Oct 20 14:49:20 2023 -0400
+
+   index on main: c6ee55ed wip
+
+content/post/2023-10-20-some-miscellaneous-git-facts.markdown | 40 ++++++++++++++++++++++++++++++++++++++++
+
+
+ +

Unsurprisingly, it contains this blog post. Makes sense!

+ +

git stash actually creates 2 separate commits: one for the index, and one for your changes that you haven’t staged yet. I found this kind of heartening because I’ve been working on a tool to snapshot and restore the state of a git repository (that I may or may not ever release) and I came up with a very similar design, so that made me feel better about my choices.

+ +

Apparently older commits in the stash are stored in the reflog.

+
+ +

Why can’t we just commit instead of stashing?

+ +
+ +

For those used to the idea of git from command line, this may seem like a strange idea. But if your git workflow is well integrated into your IDE (I must admit, I have only VS Code in mind here), then this is such a good idea.

+ +

The Atom UI

+ +

I absolutely adored the Atom UI. The best part to me was the three pane design that put File Explorer, Code and Git in view always.

+ +

The Atom UI with File Explorer, Code Area and Git/Github Panel

+ +

The Atom UI with File Explorer, Code Area and Git/Github Panel

+ +

This is good because as you went making changes in files, it kept adding a list item in the right side of the screen and you had a general idea how big your changes were becoming. Putting this upfront meant a little extra motivation to go and make experimental changes anywhere which never left your view and you could just go and cherry-pick or discard everything!

+ +

Atom Git Pane

+ +

Atom Git Pane

+ +

The Flow in Atom

+ +
+ +

Let’s say you’re in feature-branch-1 and you need to switch branches to master. Naturally, you’ll stash your changes in feature-branch-1

+ +

Here’s the alternative commit method in Atom.

+ +
+ +

What about VS Code?

+ +
+ +

VS Code doesn’t come with the same layout by default. It’s for the better and you can have the same Atom-like workflow in VS Code. Just enable a Secondary Side Bar and drag your “Source Control” and “Commits” to the second pane.

+ +

Untitled

+ +

A lot more cluttered than my Atom. But it also does a lot more than Atom!

+ +

A lot more cluttered than my Atom. But it also does a lot more than Atom!

+ +

The Same Flow in VS Code

+ +
+ +

https://www.loom.com/share/a1fa5c8bebd74fb889ae26dbbfcf63ee?sid=386b9b4e-44e3-4eec-80ab-1e5987b35dad

+ +

The Advantage

+ +
+ +

The real advantage is that a stash commit is local to a branch. This is ideal if you’re often working on multiple features and need to stash something to switch branches (often to master to create a new branch). So when you come back you see the stash commit and you’re back where you left it. Sometimes, when a week later when you revisit a branch, remembering that you stashed some code is not clear.

+ +

The case for stash

+ +
+ + + +

References

+ +
+ +

Julia Evans’ Blog Article: https://jvns.ca/blog/2023/10/20/some-miscellaneous-git-facts/

+:ET \ No newline at end of file diff --git a/_posts/2023-10-31-stash-as-a-commit.markdown b/_posts/2023-10-31-stash-as-a-commit.markdown index af5a358..2564b58 100644 --- a/_posts/2023-10-31-stash-as-a-commit.markdown +++ b/_posts/2023-10-31-stash-as-a-commit.markdown @@ -77,7 +77,7 @@ Let’s say you’re in `feature-branch-1` and you need to switch branches to `m Here’s the alternative commit method in Atom. -[https://www.loom.com/share/3b5ae799bb104aa5891ed51a92d5f6ca?sid=22e04793-241b-4213-aacd-a82d668dce49](https://www.loom.com/share/3b5ae799bb104aa5891ed51a92d5f6ca?sid=22e04793-241b-4213-aacd-a82d668dce49) +
### What about VS Code? @@ -95,7 +95,7 @@ A lot more cluttered than my Atom. But it also does a lot more than Atom! --- -[https://www.loom.com/share/a1fa5c8bebd74fb889ae26dbbfcf63ee?sid=386b9b4e-44e3-4eec-80ab-1e5987b35dad](https://www.loom.com/share/a1fa5c8bebd74fb889ae26dbbfcf63ee?sid=386b9b4e-44e3-4eec-80ab-1e5987b35dad) +
### The Advantage diff --git a/_site/blog/2023/10/31/stash-as-a-commit.html b/_site/blog/2023/10/31/stash-as-a-commit.html index d7088b5..686b93c 100644 --- a/_site/blog/2023/10/31/stash-as-a-commit.html +++ b/_site/blog/2023/10/31/stash-as-a-commit.html @@ -127,7 +127,7 @@

The Flow in Atom

Here’s the alternative commit method in Atom.

-

https://www.loom.com/share/3b5ae799bb104aa5891ed51a92d5f6ca?sid=22e04793-241b-4213-aacd-a82d668dce49

+

What about VS Code?

@@ -145,7 +145,7 @@

The Same Flow in VS Code


-

https://www.loom.com/share/a1fa5c8bebd74fb889ae26dbbfcf63ee?sid=386b9b4e-44e3-4eec-80ab-1e5987b35dad

+

The Advantage

diff --git a/_site/feed.xml b/_site/feed.xml index 85a6479..21cd1a7 100644 --- a/_site/feed.xml +++ b/_site/feed.xml @@ -1,4 +1,4 @@ -Jekyll2023-10-31T18:02:00+05:30http://localhost:4000/feed.xmlRahul KrishnaFrontend Engineer.Stash as a Commit2023-10-31T17:35:44+05:302023-10-31T17:35:44+05:30http://localhost:4000/blog/2023/10/31/stash-as-a-commit<h1 id="stash-as-a-commit">Stash as a Commit</h1> +Jekyll2023-10-31T18:07:40+05:30http://localhost:4000/feed.xmlRahul KrishnaFrontend Engineer.Stash as a Commit2023-10-31T17:35:44+05:302023-10-31T17:35:44+05:30http://localhost:4000/blog/2023/10/31/stash-as-a-commit<h1 id="stash-as-a-commit">Stash as a Commit</h1> <p>Date: October 31, 2023</p> @@ -70,7 +70,7 @@ content/post/2023-10-20-some-miscellaneous-git-facts.markdown | 40 +++++++++++++ <p>Here’s the alternative commit method in Atom.</p> -<p><a href="https://www.loom.com/share/3b5ae799bb104aa5891ed51a92d5f6ca?sid=22e04793-241b-4213-aacd-a82d668dce49">https://www.loom.com/share/3b5ae799bb104aa5891ed51a92d5f6ca?sid=22e04793-241b-4213-aacd-a82d668dce49</a></p> +<div style="position: relative; padding-bottom: 60.30150753768844%; height: 0;"><iframe src="https://www.loom.com/embed/1823d6c60e0646d5a8f26022267ea0cf?sid=6c6af21e-9e4d-46e5-aca9-1359e96a78b3" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div> <h3 id="what-about-vs-code">What about VS Code?</h3> @@ -88,7 +88,7 @@ content/post/2023-10-20-some-miscellaneous-git-facts.markdown | 40 +++++++++++++ <hr /> -<p><a href="https://www.loom.com/share/a1fa5c8bebd74fb889ae26dbbfcf63ee?sid=386b9b4e-44e3-4eec-80ab-1e5987b35dad">https://www.loom.com/share/a1fa5c8bebd74fb889ae26dbbfcf63ee?sid=386b9b4e-44e3-4eec-80ab-1e5987b35dad</a></p> +<div style="position: relative; padding-bottom: 58.91980360065466%; height: 0;"><iframe src="https://www.loom.com/embed/a1fa5c8bebd74fb889ae26dbbfcf63ee?sid=e00e01da-5fc6-4b6a-95eb-a9c3912e3e95" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen="" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div> <h3 id="the-advantage">The Advantage</h3>