composer install production
composer install --no-dev --optimize-autoloader
Here is what the above code is Doing:
1. Install the dependencies listed in composer.json
2. Remove the dev dependencies
3. Optimize the autoloader
composer install --no-dev --optimize-autoloader
Here is what the above code is Doing:
1. Install the dependencies listed in composer.json
2. Remove the dev dependencies
3. Optimize the autoloader
rsync -av –progress –exclude=”node_modules” source destination Here is what the above code is Doing: 1. rsync -av –progress –exclude=”node_modules” – rsync is the command – -a is the archive flag, which preserves permissions, ownership, and timestamps – -v is the verbose flag, which will show the progress of the transfer – –progress is the progress…
> touch ~/.bash_profile; open ~/.bash_profile Here is what the above code is Doing: 1. We’re creating a new file called .bash_profile in your home directory. 2. We’re opening that file in your default text editor. 3. We’re adding the following line to the file: export PATH=”/usr/local/bin:$PATH” 4. We’re saving the file.
# start ignoring changes to a file: git update-index –assume-unchanged path/to/file # keep tracking again: git update-index –no-assume-unchanged path/to/file Here is what the above code is Doing: 1. git update-index –assume-unchanged path/to/file – This tells git to stop tracking changes to the file. 2. git update-index –no-assume-unchanged path/to/file – This tells git to start tracking…
$ mkdir a $ cd a $ git init $ git commit –allow-empty –allow-empty-message -m ” $ git worktree add ../b $ ls .git/worktrees/ b $ rm -rf ../b $ git worktree prune $ ls .git/worktrees/ $ Here is what the above code is Doing: 1. Create a new directory, initialize it as a git…
git gc –prune=now git remote prune origin rm .git/refs/remotes/origin/master git fetch git pull origin master Here is what the above code is Doing: 1. git gc –prune=now This command will remove all the unreachable objects from the object database. 2. git remote prune origin This command will remove all the stale tracking branches. 3. rm…
#For instance, to see the difference for a file “main.c” between now #and two commits back, here are three equivalent commands: $ git diff HEAD^^ HEAD main.c $ git diff HEAD^^..HEAD — main.c $ git diff HEAD~2 HEAD — main.c Here is what the above code is Doing: 1. git diff HEAD^^ HEAD main.c –…