-
🧪test:indicates any type of creation or alteration of test codes.
Example: Creation of unit tests. -
✨feat:indicates the development of a new feature for the project.
Example: Adding a service, functionality, endpoint, etc. -
♻️refactor:used when there is a code refactoring that does not have any impact on the system logic/rules.
Example: Code changes after a code review -
🎨style:used when there are code formatting and style changes that do not change the system in any way.
Example: Change the style-guide, change the lint convention, fix indentations, remove white spaces, remove comments, etc… -
🛠️fix:used when correcting errors that are generating bugs in the system.
Example: Apply a handling for a function that is not behaving as expected and returning an error. -
🧹chore:indicates changes to the project that do not affect the system or test files. These are developmental changes.
Example: Change rules for eslint, add prettier, add more file extensions to .gitignore -
📝docs:used when there are changes in the project documentation.
Example: add information in the API documentation, change the README, etc. -
🏗️build:used to indicate changes that affect the project build process or external dependencies.
Example: Gulp, add/remove npm dependencies, etc… -
⚡️perf:indicates a change that improved system performance.
Example: change ForEach to While, etc… -
👷ci/cd:used for changes in CI configuration files.
Example: Circle, Travis, BrowserStack, etc… -
⏪️revert:indicates the reversal of a previous commit.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| Metadata | 📇 :card_index: |
| Documentation | 📚 :books: |
| Documenting source code | 💡 :bulb: |
| Performance | ⚡ :zap: |
| Style | 💄 :lipstick: |
| Fix Lint Error | 🚨 :rotating_light: |
| Adding a test | ✅ :white_check_mark: |
| Make a test pass | ✔️ :heavy_check_mark: |
| Improve format/structure | 🎨 :art: |
| Refactor code | ♻️ :recycle: |
| Removing code/files | 🔥 :fire: |
| Continuous Integration | 💚 :green_heart: |
| Security | 🔒 :lock: |
| Upgrading dependencies | ⬆️ :arrow_up: |
| Downgrading dependencies | ⬇️ :arrow_down: |
| Update code due to external API changes | 👽 :alien: |
| Typos Fix | 📝 :pencil: |
| Critical hotfix | 🚑 :ambulance: |
| Deploying stuff | 🚀 :rocket: |
| Fixing on MacOS | 🍎 :apple: |
| Fixing on Linux | 🐧 :penguin: |
| Fixing on Windows | 🪟 :window: |
| Work in progress | 🚧 :construction: |
| Adding CI build system | 👷 :construction_worker: |
| Analytics or tracking code | 📈 :chart_with_upwards_trend: |
| Removing a dependency | ➖ :heavy_minus_sign: |
| Adding a dependency | ➕ :heavy_plus_sign: |
| Docker | 🐳 :whale: |
| Configuration files | 🔧 :wrench: |
| Package.json in JS | 📦 :package: |
| Merging branches | 🔀 :twisted_rightwards_arrows: |
| Bad code / need improv. | 💩 :hankey: |
| Reverting changes | ⏪ :rewind: |
| Breaking changes | 💥 :boom: |
| Code review changes | 👌 :ok_hand: |
| Accessibility | ♿ :wheelchair: |
| Move/rename repository | 🚚 :truck: |
- Open your
.gitconfigfile inC:\Users\<user name>\.gitconfig - Paste the bellow file at the end to make
notepad++as your default editor for git[core] editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar
- Then open your local repository in terminal and run bellow command
git checkout main git rebase -i --root
- It will open the commit history in
notepad++ - Remove the commit you want to remove or sort then close the file
- Then run the below command in the terminal
git push --force
- If after adding .env to gitignore still it gets added to the commit then try this command
git rm .env --cached
- git config -> Purpose: Configure Git settings, such as user name and email.
Example: git config --global user.name "Your Name" - git init -> Purpose: Initialize a new Git repository.
Example: git init
- git clone -> Purpose: Clone an existing repository.
Example: git clone https://github.com/user/repo.git
- git status -> Purpose: Show the working directory and staging area status.
Example: git status
- git add -> Purpose: Add file contents to the index (staging area).
Example: git add . (add all files)
- git commit -> Purpose: Record changes to the repository.
Example: git commit -m "Commit message" - git push -> Purpose: Update remote refs along with associated objects.
Example: git push origin main
- git pull -> Purpose: Fetch from and integrate with another repository or local branch.
Example: git pull origin main
- git branch -> Purpose: List, create, or delete branches.
Example: git branch new-branch (create new branch)
- git checkout -> Purpose: Switch branches or restore working tree files.
Example: git checkout new-branch (switch to branch)
- git switch -> Purpose: Switch branches.
Example: git switch new-branch
- git merge -> Purpose: Join two or more development histories together.
Example: git merge new-branch (merge new-branch into current branch)
- git rebase -> Purpose: Reapply commits on top of another base tip.
Example: git rebase main
- git log -> Purpose: Show commit logs.
Example: git log --oneline
- git diff -> Purpose: Show changes between commits, commit and working tree, etc.
Example: git diff (show unstaged changes)
- git show -> Purpose: Show various types of objects.
Example: git show HEAD (show changes in the last commit)
- git stash -> Purpose: Stash the changes in a dirty working directory away.
Example: git stash
- git stash pop -> Purpose: Apply the changes recorded in the stash to the working directory.
Example: git stash pop
- git clean -> Purpose: Remove untracked files from the working directory.
Example: git clean -fd
- git remote -> Purpose: Manage set of tracked repositories.
Example: git remote add origin https://github.com/user/repo.git
- git fetch -> Purpose: Download objects and refs from another repository.
Example: git fetch origin
- git remote -v -> Purpose: Show the URLs that a remote name corresponds to.
Example: git remote -v
- git tag -> Purpose: Create, list, delete, or verify a tag object.
Example: git tag -a v1.0 -m "Version 1.0" - git push origin --tags -> Purpose: Push all tags to the remote repository.
Example: git push origin --tags
- git reset -> Purpose: Reset current HEAD to the specified state.
Example: git reset --hard HEAD~1 (reset to previous commit)
- git revert -> Purpose: Create a new commit that undoes the changes from a previous commit.
Example: git revert HEAD
- git checkout -- -> Purpose: Discard changes in the working directory.
Example: git checkout -- file.txt (discard changes in file.txt)
- git cherry-pick -> Purpose: Apply the changes introduced by some existing commits.
Example: git cherry-pick <commit-hash>
- git branch -d -> Purpose: Delete a branch.
Example: git branch -d branch-name
- git branch -D -> Purpose: Force delete a branch.
Example: git branch -D branch-name
- git merge --no-ff -> Purpose: Create a merge commit even when the merge resolves as a fast-forward.
Example: git merge --no-ff new-branch
- git rebase -i -> Purpose: Start an interactive rebase.
Example: git rebase -i HEAD~3
- git diff --staged -> Purpose: Show changes between the index and the last commit.
Example: git diff --staged
- git blame ->
Purpose: Show what revision and author last modified each line of a file.
Example: git blame file.txt
- git log --graph -> Purpose: Show a graph of the commit history.
Example: git log --graph --oneline
- git reflog -> Purpose: Show a log of all references.
Example: git reflog
- git stash list -> Purpose: List all stashes.
Example: git stash list
- git stash apply -> Purpose: Apply a stash to the working directory.
Example: git stash apply stash@{1} - git stash drop -> Purpose: Remove a single stash entry from the list of stashes.
Example: git stash drop stash@{1} - git remote show -> Purpose: Show information about the remote repository.
Example: git remote show origin
- git remote rm -> Purpose: Remove a remote.
Example: git remote rm origin
- git pull --rebase -> Purpose: Fetch and rebase the current branch on top of the upstream branch.
Example: git pull --rebase origin main
- git fetch --all -> Purpose: Fetch all remotes.
Example: git fetch --all
- git bisect -> Purpose: Use binary search to find the commit that introduced a bug.
Example: git bisect start
- git submodule -> Purpose: Initialize, update, or inspect submodules.
Example: git submodule update --init
- git archive -> Purpose: Create an archive of files from a named tree.
Example: git archive --format=tar HEAD > archive.tar - git shortlog -> Purpose: Summarize git log output.
Example: git shortlog -s -n
- git describe ->
Purpose: Give an object a human-readable name based on an available ref.
Example: git describe --tags
- git rev-parse -> Purpose: Parse revision (or other objects) and retrieve its hash.
Example: git rev-parse HEAD
- git tag -d -> Purpose: Delete a tag from the local repository.
Example: git tag -d v1.0
- git checkout -b -> Purpose: Create and switch to a new branch.
Example: git checkout -b new-branch
- git push origin --delete -> Purpose: Delete a remote branch.
Example: git push origin --delete branch-name
- git cherry -> Purpose: Find commits not merged upstream.
Example: git cherry -v
- git rm -> Purpose: Remove files from the working tree and from the index.
Example: git rm file.txt
- git mv -> Purpose: Move or rename a file, directory, or symlink.
Example: git mv oldname.txt newname.txt
- git reset HEAD -> Purpose: Unstage changes.
Example: git reset HEAD file.txt
- git log -p -> Purpose: Show changes over time for a specific file.
Example: git log -p file.txt
- git diff --cached -> Purpose: Show changes between the index and the last commit (same as --staged).
Example: git diff --cached
- git apply -> Purpose: Apply a patch to files and/or to the index.
Example: git apply patch.diff
- git format-patch -> Purpose: Prepare patches for e-mail submission.
Example: git format-patch -1 HEAD
- git am -> Purpose: Apply a series of patches from a mailbox.
Example: git am < patch.mbox
- git cherry-pick --continue -> Purpose: Resume cherry-picking after resolving conflicts.
Example: git cherry-pick --continue
- git fsck -> Purpose: Verify the connectivity and validity of objects in the database.
Example: git fsck
- git gc -> Purpose: Cleanup unnecessary files and optimize the local repository.
Example: git gc
- git prune -> Purpose: Remove unreachable objects from the object database.
Example: git prune
- git notes -> Purpose: Add or inspect object notes.
Example: git notes add -m "Note message" - git whatchanged -> Purpose: Show what changed, similar to git log.
Example: git whatchanged
- git show-branch _ -> Purpose: Show branches and their commits.
Example: git show-branch
- git verify-tag -> Purpose: Check the GPG signature of tags.
Example: git verify-tag v1.0
- git show-ref -> Purpose: List references in a local repository.
Example: git show-ref
-
Download from here
-
To see version of nvm.
nvm version <!-- or --> nvm v
-
Show if node is running in 32 or 64 bit mode. Specify 32 or 64 to override the default architecture.
nvm arch [32|64]
-
To see all the node versions available for installation.
nvm list available
-
To install the latest version of node.
nvm install latest
-
To install the LTS version of node.
nvm install lts
-
Install a specific version of node.
nvm install <version>
example
nvm install 18.3.0
-
Uninstall a specific version.
nvm uninstall <version>
example
nvm uninstall 18.3.0
-
See all the installed node version.
nvm ls
-
To specify or change the current active version.
nvm use <version>
example
nvm use 18.3.0
-
To see active version name/no.
nvm current
npm docs [package-name] // npm docs lodashnpm repo [package-name] // npm repo lodashnpm outdated // run it in a projectnpm v [package-name] versions // npm v lodash versionsnpm audit // run it in a projectnpm v [package-name] // npm v lodashnpm xmasnpm visnup-
Get list of all globally installed npm packages
npm list -g
-
Check if the package is globally installed
npm list -g <package-name>
-
Uninstall global package
npm uninstall -g <package-name>
-
Check which packages are outdated
npm outdated -g
-
Update all global packages
npm update -g
-
Update a global package
npm update -g <package_name>
-
Check all the upgradable dependency lists
npx npm-check-updates
or
npm outdated
-
Update all dependency version in
package.jsonfilenpx npm-check-updates -u
or
npm update
bun outdatedbun updatebun update --latestbun add -d <pkg>bun remove <pkg>bun remove -g <pkg>bun pm lsbun pm ls -gbun pm view <pkg>bun pm cachebun pm binbun pm bin -gbun run <script>bun <file.ts>bun --hot <file.ts>bunx <pkg>bun test -wbun test path/to/test.spec.tsbun pm lsbun pm ls-
Setup
npm install -g @angular/cli
-
New Application
ng new <app-name>
-
Lint for Formatting
The Lint command fixes code smells and corrects improper formatting.
ng lint my-app --fix
This command shows warnings:
ng lint my-app
If you want to format the code, you can use the following command.
ng lint my-app --format stylish
-
Blueprints
Generate spec:
--spec
Check whether the template will be a.ts file or not:
--inline-template (-t)
Check whether the style will be in the.ts file or not:
--inline-style (-s)
Create a directive:
ng g d directive-name
Create a pipeline:
ng g p init-caps
Create customer class in the models folder:
ng g cl models/customer
Creates a component without the need for the creation of a new folder.
ng g c my-component --flat true
Assign a prefix:
--prefix
Create an interface in the models folder:
ng g i models/person
Create an ENUM gender in the models folder:
ng g e models/gender
Create a service:
ng g s <service-name>
-
Building Serving
Build an app to /dist folder:
ng build
Optimize and build an app without using unnecessary code:
ng build --aot
Create a build for production:
ng build --prod
Specify serve with opening a browser:
ng serve -o
Reload when changes occur:
ng serve --live-reload
Serve using SSL:
ng serve -ssl
-
Add New Capabilities
Add angular material to project:
ng add @angular/material
Create a material navigation component:
ng g @angular/material:material-nav --name nav
-
Show installed versions info
dotnet --info
-
Build Project
dotnet build
-
Run Project
Will run the project
dotnet run
To get HMR and instant update of any code change
dotnet watch
-
Clean Project
dotnet clean
-
Build Release
dotnet publish

