Skip to content

Instantly share code, notes, and snippets.

View codenathan's full-sized avatar

Sakees Nathan codenathan

View GitHub Profile
@codenathan
codenathan / GIT_Remove_File_From_Commit_History.md
Created September 8, 2023 12:12
Remove File From Git Commit History

Git provides a native way to remove a file from the entire commit history

Make sure you backup your repository before attempting this.

Use the git filter-branch command to remove the file from all commits in your repository history.

Replace <file_path> with the actual file path and name from the root of your project:

git filter-branch --force --tree-filter 'rm -f ' --prune-empty -- --all
@codenathan
codenathan / Multiple_PHP_Versions.md
Created September 9, 2023 17:24
Run Multiple Version of PHP using Laravel Valet on Mac

Note Laravel Valet is only for MacOS

  • Install the latest version of Laravel Valet by following the documentation
  • Go into your individual projects and run valet isolate php@<phpversion> i.e. valet isolate 7.4
  • To Run Artistan commands use valet php artisan
  • To Run Composer use valet composer