Skip to content

Instantly share code, notes, and snippets.

View induratized's full-sized avatar
🏠
Working from home

Abhinav Sharma induratized

🏠
Working from home
View GitHub Profile
@induratized
induratized / Good commit messages.md
Created July 3, 2025 07:45 — forked from mrliptontea/Good commit messages.md
Writing good commit messages

Good commit messages serve at least three important purposes:

  • To speed up the reviewing process.
  • To find out what changed in a range of commits (e.g. for a release note).
  • To help the future maintainers, say five years into the future, to find out why a particular change was made to the code or why a specific feature was added.

Structure your commit message like this:

@induratized
induratized / git-stash-recover-dropped-stash.md
Created July 3, 2025 06:31
how to recover popped/dropped git stash item

🚨 If You Already Popped or Dropped the Stash

If you've already run git stash pop or deleted the stash, you can try to recover it from reflog:

git reflog

Look for a line like:

@induratized
induratized / git-stash-apply-unstaged.md
Created July 3, 2025 06:30
git stash: how to apply unstaged file from stash

Thanks for the update. If git stash apply didn’t restore your staged changes, it’s very likely that:

🧠 Your staged changes are in the stash, but not restored by default

When you run:

git stash apply
@induratized
induratized / git-stash-unstaged-untracked-work.md
Last active July 3, 2025 06:27
how to add unstaged + untracked file in git stash

To stash only unstaged + untracked files, while keeping staged changes intact, you can use:

git stash push --include-untracked --keep-index

✅ Explanation:

  • --keep-index: Leaves your staged files untouched.
  • --include-untracked: Includes untracked files (e.g. new files you've created but haven't added to Git yet) in the stash.
@induratized
induratized / vite-legacy-build.md
Created June 27, 2025 12:16
vite multi build for legacy + modern broswer

Ah — now I understand the nuance in your question. You're using Vite's native index.html handling, and yes:


✅ In Vite's default behavior:

When you run:

npm run build
@induratized
induratized / git-worktree.md
Created June 19, 2025 10:19
git worktree reference and best practices

🧾 Git Worktree Workflow — Best Practices and Automation


✅ Why Use git worktree in a Monorepo?

  • Work on multiple branches without switching or stashing.
  • Avoids dirty working directory issues.
  • Ideal for parallel development, review, testing, and fixes.
  • Keeps main worktree clean and focused.
@induratized
induratized / redhat-community-server-connector-extension.md
Created June 19, 2025 10:15
Redhat community server connector vscode extension configs

Here are all available "rsp-ui.rsp.*" settings you can use in your VS Code User or Workspace settings.json, as provided by the Runtime Server Protocol UI extension ([marketplace.visualstudio.com][1]):


⚙️ General Extension Flags

  • rsp-ui.rsp.java.home Specifies the path to a JDK (11+) to launch the RSP server and default Java-based runtimes. ‣ Example:
@induratized
induratized / india-college-names-list
Created June 3, 2025 16:15
indian college names list
[
"",
"A.B. High School",
"A.G. High School",
"A.G.High School, Dapoli",
"A.G.JAIN HIGHER SECONDARY SCHOOL",
"A.R.S.D College",
"A.S.S. College",
"A2Z Computers",
"Abhinav Inseva Sansthan Mahavidyala",

Question

I have a shallow cloned single branch limited history repo in my local, now i want to checkout another branch from remote , >How do i do that



Got it! You have a shallow clone of a single branch, and now you want to check out another branch from the remote repository.

By default, a shallow clone with --depth and --single-branch only fetches history for that one branch. To switch to another branch, you need to fetch that branch’s data first.

@induratized
induratized / cdn.md
Created December 23, 2024 10:26 — forked from jcubic/cdn.md
How to setup a literally free CDN