Last active
November 4, 2024 04:24
-
-
Save tqt97/abea11cf9e491dfc90c16ae62b40e126 to your computer and use it in GitHub Desktop.
Setup Alias for git bash | Command Prompt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # For git bash in window | |
| Find C:\Program Files\Git\etc\profile.d\aliases.sh and edit it | |
| ... | |
| # Alias for git | |
| alias gs='git status' | |
| alias gaa='git add .' | |
| alias gcm='git commit -m $1' | |
| alias gpom='git push origin master' | |
| alias gpo='git push origin $1' | |
| # Alias for project laravel | |
| alias new='composer create-project laravel/laravel $1' | |
| alias pa='php artisan $1' | |
| alias pas='php artisan serve' | |
| # For Command Prompt | |
| Create a file to write alias with extension .bat (example Alias.bat) | |
| => example: D:\Scripts\Alias.bat | |
| @echo off | |
| doskey c=cls | |
| doskey clear=cls | |
| doskey l=dir /a $* | |
| doskey newprojecct=composer create-project laravel/laravel $1 | |
| doskey pa=php artisan $1 | |
| doskey pas=php artisan serve | |
| doskey pamgfs=php artisan migrate:fresh --seed | |
| doskey gaa=git add . | |
| doskey gcm=git commit -m $1 | |
| # Register cmd | |
| Go to Registry Editor => Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor | |
| Create new String Value with name => AutoRun | |
| => Then modify and edit Value data with your absolute path (D:\Scripts\Alias.bat) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment