diff --git a/.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 b/.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 index 74d5e2d..a948088 100644 --- a/.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 +++ b/.jekyll-cache/Jekyll/Cache/Jekyll--Cache/b7/9606fb3afea5bd1609ed40b622142f1c98125abcfe89a76a661b0e8e343910 @@ -1,2 +1 @@ -I" -{"source"=>"/Users/azuga/Works/rahulakrishna.github.io", "destination"=>"/Users/azuga/Works/rahulakrishna.github.io/_site", "collections_dir"=>"", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:categories/:year/:month/:day/:title:output_ext"}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>["jekyll-feed", "jekyll-link-attributes"], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>"", "show_dir_listing"=>false, "permalink"=>"date", "paginate_path"=>"/page:num", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false, "syntax_highlighter"=>"rouge", "syntax_highlighter_opts"=>{:default_lang=>"plaintext", :guess_lang=>true}, "coderay"=>{}}, "title"=>"Rahul Krishna", "email"=>"rkbalu524@gmail.com", "description"=>"Frontend Engineer.", "url"=>"http://localhost:4000", "twitter_username"=>"_thisdot", "github_username"=>"rahulakrishna", "mastodon"=>[{"username"=>"_thisdot", "instance"=>"mastodon.social"}], "external_links"=>{"enabled"=>true, "rel"=>"me", "target"=>"_blank"}, "theme"=>"minima", "livereload_port"=>35729, "serving"=>true, "watch"=>true}:ET \ No newline at end of file +I"{"source"=>"/Users/azuga/Works/rahulakrishna.github.io", "destination"=>"/Users/azuga/Works/rahulakrishna.github.io/_site", "collections_dir"=>"", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:categories/:year/:month/:day/:title:output_ext"}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>["jekyll-feed", "jekyll-link-attributes"], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>"", "show_dir_listing"=>false, "permalink"=>"date", "paginate_path"=>"/page:num", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false}, "title"=>"Rahul Krishna", "email"=>"rkbalu524@gmail.com", "description"=>"Frontend Engineer.", "url"=>"http://localhost:4000", "twitter_username"=>"_thisdot", "github_username"=>"rahulakrishna", "mastodon"=>[{"username"=>"_thisdot", "instance"=>"mastodon.social"}], "external_links"=>{"enabled"=>true, "rel"=>"me", "target"=>"_blank"}, "theme"=>"minima", "livereload_port"=>35729, "serving"=>true, "watch"=>true}:ET \ No newline at end of file diff --git a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/01/649de358df3b66db851455f63fafc1d86cb120f62220417e47a55ebdf52c82 b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/01/649de358df3b66db851455f63fafc1d86cb120f62220417e47a55ebdf52c82 deleted file mode 100644 index 072d8fc..0000000 --- a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/01/649de358df3b66db851455f63fafc1d86cb120f62220417e47a55ebdf52c82 +++ /dev/null @@ -1,113 +0,0 @@ -I"9
Date: October 31, 2023
- -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.
-
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
- -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
- -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.
- -https://www.loom.com/share/3b5ae799bb104aa5891ed51a92d5f6ca?sid=22e04793-241b-4213-aacd-a82d668dce49
- -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.
- - - - - -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
- -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.
- -git stash
actually frees your branch of changes for use at a later time. Which is necessary if you donât have a branch to do a stash commit
.git stash
is the way to go.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/07/737147c5983cbc1fbfadd38a86105a7e761f6dd6d5ffc33acef269feee7f3e b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/07/737147c5983cbc1fbfadd38a86105a7e761f6dd6d5ffc33acef269feee7f3e deleted file mode 100644 index 6cb7c24..0000000 --- a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/07/737147c5983cbc1fbfadd38a86105a7e761f6dd6d5ffc33acef269feee7f3e +++ /dev/null @@ -1,2 +0,0 @@ -I"IDate: October 31, 2023
- -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.
-
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.
- -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
- -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
- -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.
- -https://www.loom.com/share/3b5ae799bb104aa5891ed51a92d5f6ca?sid=22e04793-241b-4213-aacd-a82d668dce49
- -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.
- - - - - -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
- -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.
- -git stash
actually frees your branch of changes for use at a later time. Which is necessary if you donât have a branch to do a stash commit
.git stash
is the way to go.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/12/4b658e9eb4e426b1e5cc36081d695df35ed356566327e33a6a661961d3e1a3 b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/12/4b658e9eb4e426b1e5cc36081d695df35ed356566327e33a6a661961d3e1a3 deleted file mode 100644 index bc95c17..0000000 --- a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/12/4b658e9eb4e426b1e5cc36081d695df35ed356566327e33a6a661961d3e1a3 +++ /dev/null @@ -1,113 +0,0 @@ -I"ÎDate: October 31, 2023
- -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.
-
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.
- -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
- -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
- -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.
- -https://www.loom.com/share/3b5ae799bb104aa5891ed51a92d5f6ca?sid=22e04793-241b-4213-aacd-a82d668dce49
- -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.
- - - - - -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
- -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.
- -git stash
actually frees your branch of changes for use at a later time. Which is necessary if you donât have a branch to do a stash commit
.git stash
is the way to go.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/1a/4dc97e5e22d0b8e83b674102b813c4d35f694bef5691b55801319d2bf661e2 b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/1a/4dc97e5e22d0b8e83b674102b813c4d35f694bef5691b55801319d2bf661e2 deleted file mode 100644 index a7f711a..0000000 --- a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/1a/4dc97e5e22d0b8e83b674102b813c4d35f694bef5691b55801319d2bf661e2 +++ /dev/null @@ -1,2 +0,0 @@ -I"#Date: October 21, 2023
-:ET \ No newline at end of file diff --git a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/2b/6500b0b21ba04c8c2f32a56b7f5b8a40e184ba2e2f8cabd75280b30f006f22 b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/2b/6500b0b21ba04c8c2f32a56b7f5b8a40e184ba2e2f8cabd75280b30f006f22 deleted file mode 100644 index 860b4aa..0000000 --- a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/2b/6500b0b21ba04c8c2f32a56b7f5b8a40e184ba2e2f8cabd75280b30f006f22 +++ /dev/null @@ -1,113 +0,0 @@ -I"íDate: October 31, 2023
- -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.
-
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.
- -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
- -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
- -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.
- -https://www.loom.com/share/3b5ae799bb104aa5891ed51a92d5f6ca?sid=22e04793-241b-4213-aacd-a82d668dce49
- -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.
- - - - - -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
- -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.
- -git stash
actually frees your branch of changes for use at a later time. Which is necessary if you donât have a branch to do a stash commit
.git stash
is the way to go.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/2b/d9f035e5480a8914548140f68ce84cec9d9856c21c7d3fc5dfa4feb79a07a6 b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/2b/d9f035e5480a8914548140f68ce84cec9d9856c21c7d3fc5dfa4feb79a07a6 deleted file mode 100644 index 65f1d1f..0000000 --- a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/2b/d9f035e5480a8914548140f68ce84cec9d9856c21c7d3fc5dfa4feb79a07a6 +++ /dev/null @@ -1,113 +0,0 @@ -I"ěDate: October 31, 2023
- -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.
-
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.
- -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
- -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
- -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.
- -https://www.loom.com/share/3b5ae799bb104aa5891ed51a92d5f6ca?sid=22e04793-241b-4213-aacd-a82d668dce49
- -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.
- - - - - -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
- -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.
- -git stash
actually frees your branch of changes for use at a later time. Which is necessary if you donât have a branch to do a stash commit
.git stash
is the way to go.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/3c/13bbdf6fb6bbec0e1f3b40be39a4801a922cf64b75210314aac7cf9be0db2b b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/3c/13bbdf6fb6bbec0e1f3b40be39a4801a922cf64b75210314aac7cf9be0db2b deleted file mode 100644 index 22900d8..0000000 --- a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/3c/13bbdf6fb6bbec0e1f3b40be39a4801a922cf64b75210314aac7cf9be0db2b +++ /dev/null @@ -1,2 +0,0 @@ -I"7Date: October 21, 2023
-:ET \ No newline at end of file diff --git a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/4d/9d3c522be2743a367bb33f9ece75799a3503770fe40bf463945647d739bf58 b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/4d/9d3c522be2743a367bb33f9ece75799a3503770fe40bf463945647d739bf58 deleted file mode 100644 index 6cb7c24..0000000 --- a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/4d/9d3c522be2743a367bb33f9ece75799a3503770fe40bf463945647d739bf58 +++ /dev/null @@ -1,2 +0,0 @@ -I"IDate: October 21, 2023
- -We need to render a map like this using google-map-react
. But rendering large data points makes the page unresponsive for a while and subsequent actions become slower indicating a memory leak occuring.
This is the code used. The only cleanup happening was setting data
to null
.
There are three issues present here.
- -Polyline
, and two Markers
. Somehow, drawing the marker seems to be slower and hogs up the resources.Polylines
could be made into an Overlay. Instead of creating the classes inside the Google Maps, we can make a separate Polyline
component and handle all itâs memory issues there.But we can try to Introduce a function to manually delete all of Google Mapâs event listeners.
- -// Helper function: Removes all event listeners registered with Google's addDomListener function,
-// including from __e3_ properties on target objects.
-function removeAllGoogleListeners(target, event) {
- var listeners = target["__e3_"];
- if (!listeners) {
- console.warn(
- "Couldn't find property __e3_ containing Google Maps listeners. Perhaps Google updated the Maps SDK?"
- );
- return;
- }
- var evListeners = listeners[event];
- if (evListeners) {
- for (var key in evListeners) {
- if (evListeners.hasOwnProperty(key)) {
- google.maps.event.removeListener(evListeners[key]);
- }
- }
- }
-}
-
-// Removes all DOM listeners for the given target and event.
-function removeAllDOMListeners(target, event) {
- var listeners = target["__listeners_"];
- if (!listeners || !listeners.length) {
- return;
- }
-
- // Copy to avoid iterating over array that we mutate via removeEventListener
- var copy = listeners.slice(0);
- for (var i = 0; i < copy.length; i++) {
- target.removeEventListener(event, copy[i]);
- }
-}
-
-// Shim addEventListener to capture and store registered event listeners.
-var addEventListener = EventTarget.prototype.addEventListener;
-EventTarget.prototype.addEventListener = function () {
- var eventName = arguments[0];
- var listener = arguments[1];
- if (!this["__listeners_"]) {
- this.__listeners_ = {};
- }
- var listeners = this.__listeners_;
- if (!listeners[eventName]) {
- listeners[eventName] = [];
- }
- listeners[eventName].push(listener);
- return addEventListener.apply(this, arguments);
-};
-var removeEventListener = EventTarget.prototype.removeEventListener;
-EventTarget.prototype.removeEventListener = function () {
- var eventName = arguments[0];
- var listener = arguments[1];
- if (this["__listeners_"] && this.__listeners_[eventName]) {
- // Loop because the same listener may be added twice with different
- // options, and because our simple addEventListener shim doesn't
- // check for duplicates.
- while (true) {
- var i = this.__listeners_[eventName].indexOf(listener);
- if (i === -1) {
- break;
- }
- this.__listeners_[eventName].splice(i, 1);
- }
- }
- return removeEventListener.apply(this, arguments);
-};
-
-// After you remove the Google Map from the DOM, call this function to completely free the object.
-export default function destroyGoogleMaps(window) {
- removeAllGoogleListeners(window, "blur");
- removeAllGoogleListeners(window, "resize");
- removeAllGoogleListeners(document, "click");
- removeAllGoogleListeners(document, "keydown");
- removeAllGoogleListeners(document, "keypress");
- removeAllGoogleListeners(document, "keyup");
- removeAllGoogleListeners(document, "MSFullscreenChange");
- removeAllGoogleListeners(document, "fullscreenchange");
- removeAllGoogleListeners(document, "mozfullscreenchange");
- removeAllGoogleListeners(document, "webkitfullscreenchange");
- // ASSUMPTION: No other library registers global resize and scroll event listeners! If this is not true, then you'll need to add logic to avoid removing these.
- removeAllDOMListeners(window, "resize");
- removeAllDOMListeners(window, "scroll");
-}
-
Credit to this commenter: https://issuetracker.google.com/issues/35821412#comment53
- -This resolves the memory issue to an extent.
- - - -The flow observed is. Landing page â Page with Trips View â Page with another Google Map â Page without Google Map
- -In Prod and Staging, the Page without Google Maps hogs up memory while introducing the memory cleanup in dev shows us that it requires way less memory!
- -This one happens to be very simple. While creating a Polyline
, just specify an icon and set the repeat
value as 100%
.
new google.maps.Polyline({
- strokeColor: props.color,
- geodesic: true,
- strokeWeight: 3,
- icons: [
- {
- icon: {
- path: google.maps.SymbolPath.CIRCLE,
- },
- repeat: "100%",
- },
- ],
-});
-
We can even make the icon
a SymbolPath.FORWARD_PATH
(Reference: https://developers.google.com/maps/documentation/javascript/reference/marker#SymbolPath) indicating the trip direction as well!
Now all of the computations happen inside the onGoogleApiLoaded
method of google-map-react
.
First thing, we make this function do nothing but set a state called map
. This is for us to later set the PolyLine
on to the map.
Polyline.js
import { useState } from "react";
-
-import useDeepCompareEffect from "use-deep-compare-effect";
-
-function pathsDiffer(path1, path2) {
- if (path1.getLength() != path2.length) return true;
- for (const [i, val] of path2.entries())
- if (path1.getAt(i).toJSON() != val) return true;
- return false;
-}
-
-export default function PolyLine(props) {
- const [polyline, setPolyline] = useState(null);
-
- useDeepCompareEffect(() => {
- // Create polyline after map initialized.
- if (!polyline && props.map) {
- setPolyline(
- new google.maps.Polyline({
- strokeColor: props.color,
- geodesic: true,
- strokeWeight: 3,
- icons: [
- {
- icon: {
- path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW,
- },
- repeat: "100%",
- },
- ],
- })
- );
- }
-
- // Synchronize map polyline with component props.
- if (polyline && polyline.getMap() != props.map) polyline.setMap(props.map);
- if (polyline && pathsDiffer(polyline.getPath(), props.path))
- polyline.setPath(props.path);
-
- return () => {
- // Cleanup: remove line from map
- if (polyline) polyline.setMap(null);
- };
- }, [props, polyline]);
-
- return null;
-}
-
Now inside the component,
- - - -Finally, as a sibling to GoogleMapReact
we introduce the Polyline
component.
Maps look way more meaningful
- - - -The memory consumption which went from 500MB
to 367MB
after memory cleanup, went down to 140MB
after removing the marker drawings!
Date: October 31, 2023
- -Hereâs the alternative commit method in Atom.
- +Date: October 21, 2023
- -We need to render a map like this using google-map-react
. But rendering large data points makes the page unresponsive for a while and subsequent actions become slower indicating a memory leak occuring.
This is the code used. The only cleanup happening was setting data
to null
.
There are three issues present here.
- -Polyline
, and two Markers
. Somehow, drawing the marker seems to be slower and hogs up the resources.Polylines
could be made into an Overlay. Instead of creating the classes inside the Google Maps, we can make a separate Polyline
component and handle all itâs memory issues there.But we can try to Introduce a function to manually delete all of Google Mapâs event listeners.
- -// Helper function: Removes all event listeners registered with Google's addDomListener function,
-// including from __e3_ properties on target objects.
-function removeAllGoogleListeners(target, event) {
- var listeners = target["__e3_"];
- if (!listeners) {
- console.warn(
- "Couldn't find property __e3_ containing Google Maps listeners. Perhaps Google updated the Maps SDK?"
- );
- return;
- }
- var evListeners = listeners[event];
- if (evListeners) {
- for (var key in evListeners) {
- if (evListeners.hasOwnProperty(key)) {
- google.maps.event.removeListener(evListeners[key]);
- }
- }
- }
-}
-
-// Removes all DOM listeners for the given target and event.
-function removeAllDOMListeners(target, event) {
- var listeners = target["__listeners_"];
- if (!listeners || !listeners.length) {
- return;
- }
-
- // Copy to avoid iterating over array that we mutate via removeEventListener
- var copy = listeners.slice(0);
- for (var i = 0; i < copy.length; i++) {
- target.removeEventListener(event, copy[i]);
- }
-}
-
-// Shim addEventListener to capture and store registered event listeners.
-var addEventListener = EventTarget.prototype.addEventListener;
-EventTarget.prototype.addEventListener = function () {
- var eventName = arguments[0];
- var listener = arguments[1];
- if (!this["__listeners_"]) {
- this.__listeners_ = {};
- }
- var listeners = this.__listeners_;
- if (!listeners[eventName]) {
- listeners[eventName] = [];
- }
- listeners[eventName].push(listener);
- return addEventListener.apply(this, arguments);
-};
-var removeEventListener = EventTarget.prototype.removeEventListener;
-EventTarget.prototype.removeEventListener = function () {
- var eventName = arguments[0];
- var listener = arguments[1];
- if (this["__listeners_"] && this.__listeners_[eventName]) {
- // Loop because the same listener may be added twice with different
- // options, and because our simple addEventListener shim doesn't
- // check for duplicates.
- while (true) {
- var i = this.__listeners_[eventName].indexOf(listener);
- if (i === -1) {
- break;
- }
- this.__listeners_[eventName].splice(i, 1);
- }
- }
- return removeEventListener.apply(this, arguments);
-};
-
-// After you remove the Google Map from the DOM, call this function to completely free the object.
-export default function destroyGoogleMaps(window) {
- removeAllGoogleListeners(window, "blur");
- removeAllGoogleListeners(window, "resize");
- removeAllGoogleListeners(document, "click");
- removeAllGoogleListeners(document, "keydown");
- removeAllGoogleListeners(document, "keypress");
- removeAllGoogleListeners(document, "keyup");
- removeAllGoogleListeners(document, "MSFullscreenChange");
- removeAllGoogleListeners(document, "fullscreenchange");
- removeAllGoogleListeners(document, "mozfullscreenchange");
- removeAllGoogleListeners(document, "webkitfullscreenchange");
- // ASSUMPTION: No other library registers global resize and scroll event listeners! If this is not true, then you'll need to add logic to avoid removing these.
- removeAllDOMListeners(window, "resize");
- removeAllDOMListeners(window, "scroll");
-}
-
Credit to this commenter: https://issuetracker.google.com/issues/35821412#comment53
- -This resolves the memory issue to an extent.
- - - -The flow observed is. Landing page â Page with Trips View â Page with another Google Map â Page without Google Map
- -In Prod and Staging, the Page without Google Maps hogs up memory while introducing the memory cleanup in dev shows us that it requires way less memory!
- -This one happens to be very simple. While creating a Polyline
, just specify an icon and set the repeat
value as 100%
.
new google.maps.Polyline({
- strokeColor: props.color,
- geodesic: true,
- strokeWeight: 3,
- icons: [
- {
- icon: {
- path: google.maps.SymbolPath.CIRCLE,
- },
- repeat: "100%",
- },
- ],
-});
-
We can even make the icon
a SymbolPath.FORWARD_PATH
(Reference: https://developers.google.com/maps/documentation/javascript/reference/marker#SymbolPath) indicating the trip direction as well!
Now all of the computations happen inside the onGoogleApiLoaded
method of google-map-react
.
First thing, we make this function do nothing but set a state called map
. This is for us to later set the PolyLine
on to the map.
Polyline.js
import { useState } from "react";
-
-import useDeepCompareEffect from "use-deep-compare-effect";
-
-function pathsDiffer(path1, path2) {
- if (path1.getLength() != path2.length) return true;
- for (const [i, val] of path2.entries())
- if (path1.getAt(i).toJSON() != val) return true;
- return false;
-}
-
-export default function PolyLine(props) {
- const [polyline, setPolyline] = useState(null);
-
- useDeepCompareEffect(() => {
- // Create polyline after map initialized.
- if (!polyline && props.map) {
- setPolyline(
- new google.maps.Polyline({
- strokeColor: props.color,
- geodesic: true,
- strokeWeight: 3,
- icons: [
- {
- icon: {
- path: google.maps.SymbolPath.FORWARD_CLOSED_ARROW,
- },
- repeat: "100%",
- },
- ],
- })
- );
- }
-
- // Synchronize map polyline with component props.
- if (polyline && polyline.getMap() != props.map) polyline.setMap(props.map);
- if (polyline && pathsDiffer(polyline.getPath(), props.path))
- polyline.setPath(props.path);
-
- return () => {
- // Cleanup: remove line from map
- if (polyline) polyline.setMap(null);
- };
- }, [props, polyline]);
-
- return null;
-}
-
Now inside the component,
- - - -Finally, as a sibling to GoogleMapReact
we introduce the Polyline
component.
Maps look way more meaningful
- - - -The memory consumption which went from 500MB
to 367MB
after memory cleanup, went down to 140MB
after removing the marker drawings!
Date: October 31, 2023
- -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.
-
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.
- -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
- -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
- -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.
- - - -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.
- - - - - -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
- -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.
- -git stash
actually frees your branch of changes for use at a later time. Which is necessary if you donât have a branch to do a stash commit
.git stash
is the way to go.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 deleted file mode 100644 index bb8ff1f..0000000 --- a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/be/f967ca2de758816be2235eb278f7a112163262d67a83e84c1a041b0e687942 +++ /dev/null @@ -1,113 +0,0 @@ -I"Date: October 31, 2023
- -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.
-
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.
- -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
- -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
- -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.
- - - -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.
- - - - - -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
- -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.
- -git stash
actually frees your branch of changes for use at a later time. Which is necessary if you donât have a branch to do a stash commit
.git stash
is the way to go.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/e1/bee17f9872776171ebb886683f620b12ef287fff975f8d6b9bfd49e70d6eb8 b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/e1/bee17f9872776171ebb886683f620b12ef287fff975f8d6b9bfd49e70d6eb8 deleted file mode 100644 index 671b09f..0000000 --- a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/e1/bee17f9872776171ebb886683f620b12ef287fff975f8d6b9bfd49e70d6eb8 +++ /dev/null @@ -1,109 +0,0 @@ -I">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.
-
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.
- -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
- -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
- -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.
- - - -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.
- - - - - -A lot more cluttered than my Atom. But it also does a lot more than Atom!
- -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.
- -git stash
actually frees your branch of changes for use at a later time. Which is necessary if you donât have a branch to do a stash commit
.git stash
is the way to go.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/fc/78bbcceb64ade1cdeffe3d38c5a807fcdc2e671ab636c407224d27d183222e b/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/fc/78bbcceb64ade1cdeffe3d38c5a807fcdc2e671ab636c407224d27d183222e deleted file mode 100644 index 679ac6e..0000000 --- a/.jekyll-cache/Jekyll/Cache/Jekyll--Converters--Markdown/fc/78bbcceb64ade1cdeffe3d38c5a807fcdc2e671ab636c407224d27d183222e +++ /dev/null @@ -1,113 +0,0 @@ -I"tDate: October 31, 2023
- -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.
-
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.
- -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
- -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
- -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.
- -https://www.loom.com/share/3b5ae799bb104aa5891ed51a92d5f6ca?sid=22e04793-241b-4213-aacd-a82d668dce49
- -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.
- - - - - -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
- -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.
- -git stash
actually frees your branch of changes for use at a later time. Which is necessary if you donât have a branch to do a stash commit
.git stash
is the way to go.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/_site/404.html b/_site/404.html index 6021f1a..662ea45 100644 --- a/_site/404.html +++ b/_site/404.html @@ -16,7 +16,7 @@ +{"headline":"Rahul Krishna","url":"http://localhost:4000/404.html","description":"Frontend Engineer.","@type":"WebPage","@context":"https://schema.org"} diff --git a/_site/about/index.html b/_site/about/index.html index cf0fd7d..4631ca3 100644 --- a/_site/about/index.html +++ b/_site/about/index.html @@ -1,93 +1,305 @@ + - + - -