Skip to main content

Posts

Showing posts from May, 2024

Manage your Git revert changes

To manage your Git history and view or revert changes, here are some steps you can follow: Viewing Git History 1. View Commit History    - You can see the commit history using the command:          git log         - For a more concise view, you can use:          git log --oneline      Reverting to a Previous Commit 1. Identify the Commit    - Find the commit hash from git log that you want to revert to. 2. Revert to a Specific Commit    - If you want to revert your working directory to a specific commit without changing the commit history, you can use:          git checkout <commit-hash>         - If you need to make this a new commit on your branch, you might want to create a new branch first:          git checkout -b <new-branch-...

Folder Structure for Web Apps

Folder Structure for Web Apps Creating a well-organized folder structure for modern web applications using React, Express, Nodemon, and Mongoose can significantly improve the maintainability and scalability of your project. Here’s a detailed folder structure along with some best practices: Overall Project Structure ``` project-root/ ├── (ProjectName)-Frontend/ ├── (ProjectName)-Backend/ ├── (ProjectName)-Admin/ ├── (ProjectName)_DB/ └── README.md ``` Frontend Folder Structure (React) ``` (ProjectName)-Frontend/ ├── public/ │   ├── index.html │   └── ... ├── src/ │   ├── assets/ │   │   ├── images/ │   │   └── styles/ │   ├── components/ │   │   └── ... │   ├── hooks/ │   │   └── ... │   ├── pages/ │   │   └── ... │   ├── services/ │   │   └── api.js │   ├── utils/ │   │  ...