Posts

Showing posts with the label files

How to recover all files in folder from specific branch

How to recover all files in folder from specific branch To recover all files in a folder from a specific branch to your current working tree, use the git checkout or git restore command, specifying the branch name and the path to the folder.   Run this command from your terminal:  git checkout <branch-name> -- <folder-path> For a safer, modern alternative (available in Git 2.23+), you can use Git Restore Documentation :  git restore --source = <branch-name> --staged --worktree -- <folder-path> How It Works <branch-name> : The name of the branch containing the files you want to recover. <folder-path> : The relative path to the folder (e.g., src/components/ ). The double dash ( -- ) : Tells Git to treat everything after it as a file or directory path, rather than a branch name. Once the command is run, the files will be placed into your working directory, staged, and ready to be committed

ENV variables files load ordering

 ENV variables files load ordering Standard Loading Order (Highest to Lowest) .env.local  (local overrides, all environments) .env.[mode].local  (local overrides, specific mode) .env.[mode]  (e.g.,  .env.development ) .env  (default settings)   Example: If  DB_HOST  is defined in both files, the value in  .env.local  will be used.

Files & folders monitoring in linux

Image
Files & Folders - monitoring in Linux 1.  fswatch  install: sudo apt install fswatch use: fswatch -d /home/ 2.  inotify-tools  <verdict> --> it's better install: sudo apt-get install inotify-tools use:  inotifywait /path/to/directory --recursive --monitor