|
|
instruction,output,context,trigger |
|
|
List files in current directory,"ls",[],ls |
|
|
List files with details,"ls -la",[ls],ls |
|
|
List files sorted by time,"ls -lt",[ls -la],ls |
|
|
List files human readable sizes,"ls -lh",[ls -la],ls |
|
|
Change directory,"cd project",[],cd |
|
|
Go to home directory,"cd ~",[cd project],cd |
|
|
Go to previous directory,"cd -",[cd ~],cd |
|
|
Go up one directory,"cd ..",[cd project/src],cd |
|
|
Create a directory,"mkdir new-folder",[],mk |
|
|
Create nested directories,"mkdir -p parent/child/grandchild",[mkdir new-folder],mk |
|
|
Remove a file,"rm file.txt",[ls],rm |
|
|
Remove a directory,"rm -rf folder",[rm file.txt],rm |
|
|
Remove directory recursively,"rm -r folder",[ls],rm |
|
|
Remove with confirmation,"rm -i file.txt",[],rm |
|
|
Copy a file,"cp file.txt backup.txt",[ls],cp |
|
|
Copy directory recursively,"cp -r folder backup",[cp file.txt backup.txt],cp |
|
|
Move or rename file,"mv old-name.txt new-name.txt",[ls],mv |
|
|
Move file to directory,"mv file.txt folder/",[mv old-name.txt new-name.txt],mv |
|
|
View file contents,"cat file.txt",[ls],ca |
|
|
View file with pagination,"less file.txt",[cat file.txt],le |
|
|
View file head,"head file.txt",[cat file.txt],he |
|
|
View file tail,"tail file.txt",[head file.txt],ta |
|
|
Follow file updates,"tail -f logs/app.log",[tail file.txt],ta |
|
|
View last 50 lines,"tail -n 50 file.txt",[tail file.txt],ta |
|
|
Search in files,"grep """"search term"""" file.txt",[cat file.txt],gr |
|
|
Search recursively,"grep -r """"search term"""" .",[grep "search term" file.txt],gr |
|
|
Search case insensitive,"grep -i """"search"""" file.txt",[grep "search term" file.txt],gr |
|
|
Search with line numbers,"grep -n """"search"""" file.txt",[grep -i "search" file.txt],gr |
|
|
Search exclude pattern,"grep -v """"exclude"""" file.txt",[grep "search" file.txt],gr |
|
|
Count matching lines,"grep -c """"pattern"""" file.txt",[grep "search" file.txt],gr |
|
|
Search multiple files,"grep """"pattern"""" *.txt",[grep "search" file.txt],gr |
|
|
Find files by name,"find . -name """"*.js""""",[],fi |
|
|
Find files by type,"find . -type f -name """"*.txt""""",[find . -name "*.js"],fi |
|
|
Find and delete,"find . -name """"*.log"""" -delete",[find . -name "*.js"],fi |
|
|
Find files modified recently,"find . -mtime -7",[find . -type f],fi |
|
|
Find large files,"find . -size +100M",[find . -type f],fi |
|
|
Find and execute command,"find . -name """"*.txt"""" -exec cat {} \;",[find . -name "*.js"],fi |
|
|
Check current directory path,"pwd",[],pw |
|
|
Create empty file,"touch file.txt",[],to |
|
|
Update file timestamp,"touch existing.txt",[touch file.txt],to |
|
|
Display file permissions,"stat file.txt",[ls -la],st |
|
|
Change file permissions,"chmod 755 script.sh",[stat file.txt],ch |
|
|
Make file executable,"chmod +x script.sh",[chmod 755 script.sh],ch |
|
|
Remove execute permission,"chmod -x file.txt",[chmod +x script.sh],ch |
|
|
Change file owner,"chown user:group file.txt",[chmod 755 script.sh],ch |
|
|
Change ownership recursively,"chown -R user:group folder",[chown user:group file.txt],ch |
|
|
View disk usage,"du -sh *",[],du |
|
|
View directory size,"du -sh folder",[du -sh *],du |
|
|
View disk space,"df -h",[],df |
|
|
Check free memory,"free -h",[df -h],fr |
|
|
View running processes,"ps aux",[],ps |
|
|
View processes tree,"ps auxf",[ps aux],ps |
|
|
Find process by name,"ps aux | grep node",[ps aux],ps |
|
|
Kill a process,"kill 1234",[ps aux | grep node],ki |
|
|
Force kill process,"kill -9 1234",[kill 1234],ki |
|
|
Kill by process name,"pkill node",[ps aux | grep node],pk |
|
|
Kill all matching processes,"killall node",[pkill node],ki |
|
|
View system resources,"top",[],to |
|
|
Interactive process viewer,"htop",[top],ht |
|
|
Display environment variables,"env",[],en |
|
|
Print specific variable,"echo $PATH",[env],ec |
|
|
Set environment variable,"export API_KEY=abc123",[],ex |
|
|
Unset environment variable,"unset API_KEY",[export API_KEY=abc123],un |
|
|
Source a file,"source .bashrc",[],so |
|
|
Reload shell configuration,"source ~/.zshrc",[source .bashrc],so |
|
|
Create symbolic link,"ln -s target link-name",[],ln |
|
|
Create hard link,"ln target link-name",[ln -s target link-name],ln |
|
|
Remove symbolic link,"unlink link-name",[ln -s target link-name],un |
|
|
View link target,"readlink link-name",[ln -s target link-name],re |
|
|
Compress with tar,"tar -czf archive.tar.gz folder",[],ta |
|
|
Extract tar.gz file,"tar -xzf archive.tar.gz",[tar -czf archive.tar.gz folder],ta |
|
|
Extract to specific directory,"tar -xzf archive.tar.gz -C /path/to/dir",[tar -xzf archive.tar.gz],ta |
|
|
List tar contents,"tar -tzf archive.tar.gz",[tar -czf archive.tar.gz folder],ta |
|
|
Create zip file,"zip -r archive.zip folder",[],zi |
|
|
Extract zip file,"unzip archive.zip",[zip -r archive.zip folder],un |
|
|
List zip contents,"unzip -l archive.zip",[zip -r archive.zip folder],un |
|
|
Install npm package locally,"npm install package-name",[],np |
|
|
Install npm package globally,"npm install -g package-name",[npm install package-name],np |
|
|
Install dev dependency,"npm install --save-dev package-name",[npm install package-name],np |
|
|
Install exact version,"npm install package-name@1.2.3",[npm install package-name],np |
|
|
Update npm packages,"npm update",[npm install package-name],np |
|
|
Update specific package,"npm update package-name",[npm update],np |
|
|
Remove npm package,"npm uninstall package-name",[npm install package-name],np |
|
|
List installed packages,"npm list",[npm install package-name],np |
|
|
List global packages,"npm list -g --depth=0",[npm list],np |
|
|
Check outdated packages,"npm outdated",[npm list],np |
|
|
Run npm script,"npm run build",[],np |
|
|
Run npm start,"npm start",[npm run build],np |
|
|
Run npm test,"npm test",[npm start],np |
|
|
Run development server,"npm run dev",[npm start],np |
|
|
Initialize npm project,"npm init",[],np |
|
|
Initialize with defaults,"npm init -y",[npm init],np |
|
|
Clear npm cache,"npm cache clean --force",[npm install package-name],np |
|
|
Audit npm packages,"npm audit",[npm list],np |
|
|
Fix npm vulnerabilities,"npm audit fix",[npm audit],np |
|
|
View npm config,"npm config list",[],np |
|
|
Set npm config,"npm config set registry https://registry.npmjs.org/",[],np |
|
|
Install with yarn,"yarn add package-name",[],ya |
|
|
Install dev dependency yarn,"yarn add --dev package-name",[yarn add package-name],ya |
|
|
Install global with yarn,"yarn global add package-name",[yarn add package-name],ya |
|
|
Remove package with yarn,"yarn remove package-name",[yarn add package-name],ya |
|
|
Update yarn packages,"yarn upgrade",[yarn add package-name],ya |
|
|
Run yarn script,"yarn build",[],ya |
|
|
Initialize yarn project,"yarn init",[],ya |
|
|
Install all dependencies,"yarn install",[yarn init],ya |
|
|
Check yarn outdated,"yarn outdated",[yarn install],ya |
|
|
Install with pnpm,"pnpm install package-name",[],pn |
|
|
Run pnpm script,"pnpm run build",[pnpm install package-name],pn |
|
|
Install Python package,"pip install package-name",[],pi |
|
|
Install from requirements,"pip install -r requirements.txt",[pip install package-name],pi |
|
|
Install specific version,"pip install package-name==1.2.3",[pip install package-name],pi |
|
|
Upgrade pip package,"pip install --upgrade package-name",[pip install package-name],pi |
|
|
Uninstall pip package,"pip uninstall package-name",[pip install package-name],pi |
|
|
List pip packages,"pip list",[pip install package-name],pi |
|
|
Show package info,"pip show package-name",[pip list],pi |
|
|
Freeze requirements,"pip freeze > requirements.txt",[pip install package-name],pi |
|
|
Search pip packages,"pip search package-name",[],pi |
|
|
Create virtual environment,"python -m venv venv",[],py |
|
|
Activate virtual environment,"source venv/bin/activate",[python -m venv venv],so |
|
|
Deactivate venv,"deactivate",[source venv/bin/activate],de |
|
|
Run Python script,"python script.py",[],py |
|
|
Run Python module,"python -m module_name",[python script.py],py |
|
|
Python interactive shell,"python",[],py |
|
|
Check Python version,"python --version",[],py |
|
|
Install Ruby gem,"gem install gem-name",[],ge |
|
|
List installed gems,"gem list",[gem install gem-name],ge |
|
|
Uninstall gem,"gem uninstall gem-name",[gem install gem-name],ge |
|
|
Update gems,"gem update",[gem list],ge |
|
|
Install with bundle,"bundle install",[],bu |
|
|
Update bundle,"bundle update",[bundle install],bu |
|
|
Run with bundle exec,"bundle exec rails server",[bundle install],bu |
|
|
Install Rust package,"cargo install package-name",[],ca |
|
|
Build Rust project,"cargo build",[],ca |
|
|
Build for release,"cargo build --release",[cargo build],ca |
|
|
Run Rust project,"cargo run",[cargo build],ca |
|
|
Test Rust project,"cargo test",[cargo run],ca |
|
|
Update Rust dependencies,"cargo update",[cargo build],ca |
|
|
Add Rust dependency,"cargo add package-name",[],ca |
|
|
Check Rust project,"cargo check",[cargo build],ca |
|
|
Format Rust code,"cargo fmt",[cargo check],ca |
|
|
Lint Rust code,"cargo clippy",[cargo fmt],ca |
|
|
Install Go package,"go install package-name",[],go |
|
|
Build Go project,"go build",[],go |
|
|
Run Go project,"go run main.go",[go build],go |
|
|
Test Go project,"go test ./..",[go run main.go],go |
|
|
Format Go code,"go fmt ./..",[go build],go |
|
|
Get Go dependencies,"go get package-name",[],go |
|
|
Update Go modules,"go get -u ./..",[go get package-name],go |
|
|
Tidy Go modules,"go mod tidy",[go get package-name],go |
|
|
Initialize Go module,"go mod init module-name",[],go |
|
|
Download Go dependencies,"go mod download",[go mod init module-name],go |
|
|
Run Docker container,"docker run image-name",[],do |
|
|
Run container detached,"docker run -d image-name",[docker run image-name],do |
|
|
Run with port mapping,"docker run -p 8080:80 image-name",[docker run image-name],do |
|
|
Run with volume mount,"docker run -v $(pwd):/app image-name",[docker run -p 8080:80 image-name],do |
|
|
Run interactive shell,"docker run -it image-name /bin/bash",[docker run image-name],do |
|
|
Run with environment variables,"docker run -e KEY=value image-name",[docker run image-name],do |
|
|
Run with name,"docker run --name container-name image-name",[docker run image-name],do |
|
|
List running containers,"docker ps",[docker run image-name],do |
|
|
List all containers,"docker ps -a",[docker ps],do |
|
|
Stop container,"docker stop container-name",[docker ps],do |
|
|
Start stopped container,"docker start container-name",[docker stop container-name],do |
|
|
Restart container,"docker restart container-name",[docker start container-name],do |
|
|
Remove container,"docker rm container-name",[docker stop container-name],do |
|
|
Force remove container,"docker rm -f container-name",[docker rm container-name],do |
|
|
View container logs,"docker logs container-name",[docker ps],do |
|
|
Follow container logs,"docker logs -f container-name",[docker logs container-name],do |
|
|
Execute command in container,"docker exec container-name command",[docker ps],do |
|
|
Interactive shell in container,"docker exec -it container-name /bin/bash",[docker exec container-name command],do |
|
|
Copy files to container,"docker cp file.txt container-name:/path",[docker ps],do |
|
|
Copy files from container,"docker cp container-name:/path/file.txt .",[docker cp file.txt container-name:/path],do |
|
|
Build Docker image,"docker build -t image-name .",[],do |
|
|
Build with tag,"docker build -t image-name:tag .",[docker build -t image-name .],do |
|
|
Build with no cache,"docker build --no-cache -t image-name .",[docker build -t image-name .],do |
|
|
List Docker images,"docker images",[docker build -t image-name .],do |
|
|
Remove Docker image,"docker rmi image-name",[docker images],do |
|
|
Pull Docker image,"docker pull image-name",[],do |
|
|
Push Docker image,"docker push image-name",[docker build -t image-name .],do |
|
|
Tag Docker image,"docker tag source-image target-image",[docker build -t image-name .],do |
|
|
Inspect Docker container,"docker inspect container-name",[docker ps],do |
|
|
View container stats,"docker stats",[docker ps],do |
|
|
View container processes,"docker top container-name",[docker ps],do |
|
|
Prune unused containers,"docker container prune",[docker ps -a],do |
|
|
Prune unused images,"docker image prune",[docker images],do |
|
|
Prune everything,"docker system prune -a",[docker container prune],do |
|
|
Create Docker network,"docker network create network-name",[],do |
|
|
List Docker networks,"docker network ls",[docker network create network-name],do |
|
|
Connect container to network,"docker network connect network-name container-name",[docker network create network-name],do |
|
|
Create Docker volume,"docker volume create volume-name",[],do |
|
|
List Docker volumes,"docker volume ls",[docker volume create volume-name],do |
|
|
Remove Docker volume,"docker volume rm volume-name",[docker volume ls],do |
|
|
Run docker-compose,"docker-compose up",[],do |
|
|
Run compose detached,"docker-compose up -d",[docker-compose up],do |
|
|
Stop docker-compose,"docker-compose down",[docker-compose up],do |
|
|
Build with compose,"docker-compose build",[docker-compose up],do |
|
|
View compose logs,"docker-compose logs",[docker-compose up],do |
|
|
Follow compose logs,"docker-compose logs -f",[docker-compose logs],do |
|
|
Scale service,"docker-compose up --scale service=3",[docker-compose up],do |
|
|
Restart compose service,"docker-compose restart service-name",[docker-compose up],do |
|
|
Execute in compose service,"docker-compose exec service-name command",[docker-compose up],do |
|
|
SSH to remote server,"ssh user@hostname",[],ss |
|
|
SSH with key,"ssh -i key.pem user@hostname",[ssh user@hostname],ss |
|
|
SSH with port,"ssh -p 2222 user@hostname",[ssh user@hostname],ss |
|
|
Copy file via SCP,"scp file.txt user@hostname:/path",[ssh user@hostname],sc |
|
|
Copy directory via SCP,"scp -r folder user@hostname:/path",[scp file.txt user@hostname:/path],sc |
|
|
Copy from remote,"scp user@hostname:/path/file.txt .",[scp file.txt user@hostname:/path],sc |
|
|
Sync with rsync,"rsync -avz source/ destination/",[],rs |
|
|
Sync to remote,"rsync -avz folder/ user@hostname:/path/",[rsync -avz source/ destination/],rs |
|
|
Sync with delete,"rsync -avz --delete source/ destination/",[rsync -avz source/ destination/],rs |
|
|
Test network connection,"ping google.com",[],pi |
|
|
Test specific count,"ping -c 4 google.com",[ping google.com],pi |
|
|
Check open ports,"netstat -tuln",[],ne |
|
|
View network interfaces,"ifconfig",[],if |
|
|
View IP address,"ip addr",[ifconfig],ip |
|
|
Download file with curl,"curl -O https://example.com/file.txt",[],cu |
|
|
Download with custom name,"curl -o filename.txt https://example.com/file",[curl -O https: |
|
|
POST request with curl,"curl -X POST https://api.example.com/data",[curl -O https: |
|
|
POST with JSON data,"curl -X POST -H """"Content-Type: application/json"""" -d '{""""key"""":""""value""""}' https://api.example.com",[curl -X POST https: |
|
|
Curl with headers,"curl -H """"Authorization: Bearer token"""" https://api.example.com",[curl -X POST https: |
|
|
Follow redirects,"curl -L https://example.com",[curl -O https: |
|
|
Save response headers,"curl -D headers.txt https://example.com",[curl -O https: |
|
|
Download with wget,"wget https://example.com/file.txt",[],wg |
|
|
Download in background,"wget -b https://example.com/file.txt",[wget https: |
|
|
Resume download,"wget -c https://example.com/file.txt",[wget https: |
|
|
Download entire website,"wget -r https://example.com",[wget https: |
|
|
Run make command,"make",[],ma |
|
|
Make with specific target,"make build",[make],ma |
|
|
Clean make artifacts,"make clean",[make build],ma |
|
|
Make with parallel jobs,"make -j4",[make],ma |
|
|
Run CMake,"cmake .",[],cm |
|
|
Build with CMake,"cmake --build .",[cmake .],cm |
|
|
Install with CMake,"cmake --install .",[cmake --build .],cm |
|
|
Run tests with CTest,"ctest",[cmake --build .],ct |
|
|
Format code with prettier,"npx prettier --write .",[],np |
|
|
Check prettier formatting,"npx prettier --check .",[npx prettier --write .],np |
|
|
Lint with ESLint,"npx eslint .",[],np |
|
|
Fix ESLint errors,"npx eslint --fix .",[npx eslint .],np |
|
|
Run TypeScript compiler,"npx tsc",[],np |
|
|
Watch TypeScript,"npx tsc --watch",[npx tsc],np |
|
|
Run Webpack,"npx webpack",[],np |
|
|
Run Webpack dev server,"npx webpack serve",[npx webpack],np |
|
|
Build production bundle,"npx webpack --mode production",[npx webpack],np |
|
|
Run Vite dev server,"npm run dev",[],np |
|
|
Build with Vite,"npm run build",[npm run dev],np |
|
|
Preview Vite build,"npm run preview",[npm run build],np |
|
|
Run Jest tests,"npm test",[],np |
|
|
Watch Jest tests,"npm test -- --watch",[npm test],np |
|
|
Run Jest with coverage,"npm test -- --coverage",[npm test],np |
|
|
Run specific test file,"npm test -- path/to/test.js",[npm test],np |
|
|
Run Vitest,"npx vitest",[],np |
|
|
Run Vitest UI,"npx vitest --ui",[npx vitest],np |
|
|
Run Mocha tests,"npx mocha",[],np |
|
|
Run Cypress tests,"npx cypress open",[],np |
|
|
Run Cypress headless,"npx cypress run",[npx cypress open],np |
|
|
Run Playwright tests,"npx playwright test",[],np |
|
|
Show Playwright report,"npx playwright show-report",[npx playwright test],np |
|
|
Run Python tests with pytest,"pytest",[],py |
|
|
Run pytest verbose,"pytest -v",[pytest],py |
|
|
Run pytest with coverage,"pytest --cov",[pytest -v],py |
|
|
Run specific test file,"pytest tests/test_file.py",[pytest],py |
|
|
Run Django server,"python manage.py runserver",[],py |
|
|
Create Django migration,"python manage.py makemigrations",[python manage.py runserver],py |
|
|
Apply Django migrations,"python manage.py migrate",[python manage.py makemigrations],py |
|
|
Create Django superuser,"python manage.py createsuperuser",[python manage.py migrate],py |
|
|
Run Flask app,"flask run",[],fl |
|
|
Run Flask debug mode,"flask run --debug",[flask run],fl |
|
|
Start Rails server,"rails server",[],ra |
|
|
Run Rails console,"rails console",[rails server],ra |
|
|
Create Rails migration,"rails generate migration MigrationName",[rails server],ra |
|
|
Run Rails migrations,"rails db:migrate",[rails generate migration MigrationName],ra |
|
|
Rollback Rails migration,"rails db:rollback",[rails db:migrate],ra |
|
|
Create Rails model,"rails generate model ModelName",[rails server],ra |
|
|
Lint Python with flake8,"flake8 .",[],fl |
|
|
Format Python with black,"black .",[flake8 .],bl |
|
|
Sort Python imports,"isort .",[black .],is |
|
|
Type check with mypy,"mypy .",[],my |
|
|
Lint Python with pylint,"pylint module_name",[flake8 .],py |
|
|
Format code with rustfmt,"rustfmt src/*.rs",[],ru |
|
|
Run Rubocop,"rubocop",[],ru |
|
|
Fix Rubocop offenses,"rubocop -a",[rubocop],ru |
|
|
Format Go with gofmt,"gofmt -w .",[],go |
|
|
Vet Go code,"go vet ./..",[gofmt -w .],go |
|
|
Connect to MySQL,"mysql -u root -p",[],my |
|
|
Connect to specific database,"mysql -u user -p database_name",[mysql -u root -p],my |
|
|
Execute MySQL query,"mysql -u root -p -e """"SELECT * FROM table""""",[mysql -u root -p],my |
|
|
Import SQL file,"mysql -u root -p database_name < file.sql",[mysql -u root -p],my |
|
|
Export database,"mysqldump -u root -p database_name > backup.sql",[mysql -u root -p database_name],my |
|
|
Connect to PostgreSQL,"psql -U postgres",[],ps |
|
|
Connect to specific database,"psql -U user -d database_name",[psql -U postgres],ps |
|
|
List PostgreSQL databases,"psql -U postgres -l",[psql -U postgres],ps |
|
|
Execute PostgreSQL query,"psql -U postgres -c """"SELECT * FROM table""""",[psql -U postgres],ps |
|
|
Import PostgreSQL file,"psql -U postgres database_name < file.sql",[psql -U postgres],ps |
|
|
Export PostgreSQL database,"pg_dump -U postgres database_name > backup.sql",[psql -U postgres database_name],ps |
|
|
Connect to MongoDB,"mongo",[],mo |
|
|
Connect to specific MongoDB,"mongo mongodb://localhost:27017/database",[mongo],mo |
|
|
Import MongoDB data,"mongoimport --db database --collection collection --file data.json",[mongo],mo |
|
|
Export MongoDB data,"mongoexport --db database --collection collection --out data.json",[mongoimport --db database --collection collection --file data.json],mo |
|
|
Start Redis CLI,"redis-cli",[],re |
|
|
Set Redis key,"redis-cli SET key value",[redis-cli],re |
|
|
Get Redis key,"redis-cli GET key",[redis-cli SET key value],re |
|
|
Flush Redis database,"redis-cli FLUSHDB",[redis-cli],re |
|
|
Install package with brew,"brew install package-name",[],br |
|
|
Update Homebrew,"brew update",[brew install package-name],br |
|
|
Upgrade packages,"brew upgrade",[brew update],br |
|
|
List installed packages,"brew list",[brew install package-name],br |
|
|
Search Homebrew packages,"brew search package-name",[],br |
|
|
Uninstall Homebrew package,"brew uninstall package-name",[brew install package-name],br |
|
|
View package info,"brew info package-name",[brew list],br |
|
|
Clean up Homebrew,"brew cleanup",[brew upgrade],br |
|
|
Install with apt,"sudo apt install package-name",[],ap |
|
|
Update apt packages,"sudo apt update",[sudo apt install package-name],ap |
|
|
Upgrade apt packages,"sudo apt upgrade",[sudo apt update],ap |
|
|
Remove apt package,"sudo apt remove package-name",[sudo apt install package-name],ap |
|
|
Search apt packages,"apt search package-name",[],ap |
|
|
Clean apt cache,"sudo apt clean",[sudo apt upgrade],ap |
|
|
Install with yum,"sudo yum install package-name",[],yu |
|
|
Update yum packages,"sudo yum update",[sudo yum install package-name],yu |
|
|
Remove yum package,"sudo yum remove package-name",[sudo yum install package-name],yu |
|
|
Check system info,"uname -a",[],un |
|
|
View system uptime,"uptime",[uname -a],up |
|
|
View logged in users,"who",[],wh |
|
|
View current user,"whoami",[who],wh |
|
|
View user groups,"groups",[whoami],gr |
|
|
Add user,"sudo useradd username",[],us |
|
|
Delete user,"sudo userdel username",[sudo useradd username],us |
|
|
Change user password,"passwd",[],pa |
|
|
Change another user password,"sudo passwd username",[passwd],pa |
|
|
Switch user,"su - username",[],su |
|
|
Run as sudo,"sudo command",[],su |
|
|
Edit sudoers file,"sudo visudo",[],vi |
|
|
View command history,"history",[],hi |
|
|
Clear command history,"history -c",[history],hi |
|
|
Execute previous command,"!!",[history],ex |
|
|
Search history,"history | grep command",[history],hi |
|
|
Run command from history,"!123",[history],ex |
|
|
Create alias,"alias ll='ls -la'",[],al |
|
|
Remove alias,"unalias ll",[alias ll='ls -la'],un |
|
|
View all aliases,"alias",[alias ll='ls -la'],al |
|
|
Count lines in file,"wc -l file.txt",[cat file.txt],wc |
|
|
Count words in file,"wc -w file.txt",[wc -l file.txt],wc |
|
|
Count characters,"wc -c file.txt",[wc -w file.txt],wc |
|
|
Sort file contents,"sort file.txt",[cat file.txt],so |
|
|
Sort numerically,"sort -n file.txt",[sort file.txt],so |
|
|
Sort in reverse,"sort -r file.txt",[sort file.txt],so |
|
|
Remove duplicate lines,"sort file.txt | uniq",[sort file.txt],un |
|
|
Count duplicates,"sort file.txt | uniq -c",[sort file.txt | uniq],un |
|
|
Compare files,"diff file1.txt file2.txt",[],di |
|
|
Unified diff format,"diff -u file1.txt file2.txt",[diff file1.txt file2.txt],di |
|
|
Compare directories,"diff -r dir1 dir2",[diff file1.txt file2.txt],di |
|
|
Create patch file,"diff -u original.txt modified.txt > changes.patch",[diff file1.txt file2.txt],di |
|
|
Apply patch,"patch original.txt < changes.patch",[diff -u original.txt modified.txt > changes.patch],pa |
|
|
Stream editor replace,"sed 's/old/new/g' file.txt",[cat file.txt],se |
|
|
Replace in-place,"sed -i 's/old/new/g' file.txt",[sed 's/old/new/g' file.txt],se |
|
|
Delete lines matching pattern,"sed '/pattern/d' file.txt",[sed 's/old/new/g' file.txt],se |
|
|
Print specific lines,"sed -n '10,20p' file.txt",[cat file.txt],se |
|
|
AWK print column,"awk '{print $1}' file.txt",[cat file.txt],aw |
|
|
AWK with condition,"awk '$1 > 10 {print $2}' file.txt",[awk '{print $1}' file.txt],aw |
|
|
AWK sum column,"awk '{sum+=$1} END {print sum}' file.txt",[awk '{print $1}' file.txt],aw |
|
|
Cut by delimiter,"cut -d',' -f1,3 file.csv",[cat file.csv],cu |
|
|
Cut by character position,"cut -c1-10 file.txt",[cat file.txt],cu |
|
|
Paste files side by side,"paste file1.txt file2.txt",[],pa |
|
|
Join files by field,"join file1.txt file2.txt",[paste file1.txt file2.txt],jo |
|
|
Translate characters,"tr 'a-z' 'A-Z' < file.txt",[cat file.txt],tr |
|
|
Delete characters,"tr -d '[:digit:]' < file.txt",[tr 'a-z' 'A-Z' < file.txt],tr |
|
|
Squeeze repeated characters,"tr -s ' ' < file.txt",[tr 'a-z' 'A-Z' < file.txt],tr |
|
|
Calculate expression,"bc <<< """"2+2""""",[],bc |
|
|
Calculate with decimals,"bc <<< """"scale=2; 10/3""""",[bc <<< "2+2"],bc |
|
|
View calendar,"cal",[],ca |
|
|
View specific month,"cal 12 2024",[cal],ca |
|
|
View date,"date",[],da |
|
|
Format date output,"date +""""%Y-%m-%d""""",[date],da |
|
|
Set date,"sudo date -s """"2024-01-01 12:00:00""""",[date],da |
|
|
Schedule with cron,"crontab -e",[],cr |
|
|
List cron jobs,"crontab -l",[crontab -e],cr |
|
|
Remove cron jobs,"crontab -r",[crontab -l],cr |
|
|
Schedule one-time job,"at now + 1 hour",[],at |
|
|
List scheduled jobs,"atq",[at now + 1 hour],at |
|
|
Remove scheduled job,"atrm job-id",[atq],at |
|
|
Watch command output,"watch -n 1 'ls -la'",[],wa |
|
|
Run command in background,"command &",[],co |
|
|
Bring job to foreground,"fg",[command &],fg |
|
|
List background jobs,"jobs",[command &],jo |
|
|
Resume background job,"bg",[Ctrl+Z],bg |
|
|
Redirect output to file,"command > output.txt",[],co |
|
|
Append to file,"command >> output.txt",[command > output.txt],co |
|
|
Redirect errors,"command 2> errors.txt",[command > output.txt],co |
|
|
Redirect both output and errors,"command &> output.txt",[command 2> errors.txt],co |
|
|
Pipe to another command,"command1 | command2",[],co |
|
|
Tee output to file and stdout,"command | tee output.txt",[command > output.txt],te |
|
|
Xargs execute command,"find . -name """"*.txt"""" | xargs cat",[find . -name "*.txt"],xa |
|
|
Check command exists,"which command",[],wh |
|
|
Find command location,"whereis command",[which command],wh |
|
|
View command type,"type command",[which command],ty |
|
|
Get command info,"info command",[which command],in |
|
|
Manual page,"man command",[],ma |
|
|
Search manual pages,"man -k keyword",[man command],ma |
|
|
Display text in terminal,"echo """"Hello World""""",[],ec |
|
|
Echo without newline,"echo -n """"text""""",[echo "Hello World"],ec |
|
|
Echo with escape sequences,"echo -e """"Line1\nLine2""""",[echo "Hello World"],ec |
|
|
Print formatted text,"printf """"%s %d\n"""" """"Count"""" 42",[echo "Hello World"],pr |
|
|
Clear terminal screen,"clear",[],cl |
|
|
Reset terminal,"reset",[clear],re |
|
|
View terminal size,"stty size",[],st |
|
|
Generate random number,"echo $RANDOM",[],ec |
|
|
Base64 encode,"echo """"text"""" | base64",[],ba |
|
|
Base64 decode,"echo """"dGV4dA=="""" | base64 -d",[echo "text" | base64],ba |
|
|
Generate UUID,"uuidgen",[],uu |
|
|
Calculate MD5 hash,"md5sum file.txt",[],md |
|
|
Calculate SHA256 hash,"sha256sum file.txt",[md5sum file.txt],sh |
|
|
Check file type,"file filename",[ls],fi |
|
|
View file inode,"ls -i file.txt",[ls -la],ls |
|
|
Create hard link count check,"stat -f %l file.txt",[stat file.txt],st |
|
|
Monitor system logs,"tail -f /var/log/syslog",[],ta |
|
|
View system messages,"dmesg",[],dm |
|
|
View last logins,"last",[],la |
|
|
View failed login attempts,"sudo lastb",[last],la |
|
|
Check service status,"systemctl status service-name",[],sy |
|
|
Start service,"sudo systemctl start service-name",[systemctl status service-name],sy |
|
|
Stop service,"sudo systemctl stop service-name",[sudo systemctl start service-name],sy |
|
|
Restart service,"sudo systemctl restart service-name",[sudo systemctl start service-name],sy |
|
|
Enable service at boot,"sudo systemctl enable service-name",[systemctl status service-name],sy |
|
|
Disable service at boot,"sudo systemctl disable service-name",[sudo systemctl enable service-name],sy |
|
|
View service logs,"journalctl -u service-name",[systemctl status service-name],jo |
|
|
Follow service logs,"journalctl -u service-name -f",[journalctl -u service-name],jo |
|
|
View all systemd units,"systemctl list-units",[systemctl status service-name],sy |
|
|
Check port is listening,"lsof -i :8080",[],ls |
|
|
List open files,"lsof",[lsof -i :8080],ls |
|
|
List files by process,"lsof -p 1234",[lsof],ls |
|
|
Find process using port,"lsof -i :3000",[lsof -i :8080],ls |
|
|
Trace system calls,"strace command",[],st |
|
|
Trace with timestamps,"strace -t command",[strace command],st |
|
|
Trace specific syscall,"strace -e open command",[strace command],st |
|
|
Profile code execution,"time command",[],ti |
|
|
Detailed time output,"/usr/bin/time -v command",[time command],ti |
|
|
Benchmark command,"hyperfine command",[time command],hy |
|
|
Create AWS S3 bucket,"aws s3 mb s3://bucket-name",[],aw |
|
|
List S3 buckets,"aws s3 ls",[aws s3 mb s3: |
|
|
Copy to S3,"aws s3 cp file.txt s3://bucket-name/",[aws s3 ls],aw |
|
|
Sync directory to S3,"aws s3 sync ./folder s3://bucket-name/",[aws s3 cp file.txt s3: |
|
|
Download from S3,"aws s3 cp s3://bucket-name/file.txt .",[aws s3 ls],aw |
|
|
Remove S3 object,"aws s3 rm s3://bucket-name/file.txt",[aws s3 cp file.txt s3: |
|
|
List EC2 instances,"aws ec2 describe-instances",[],aw |
|
|
Start EC2 instance,"aws ec2 start-instances --instance-ids i-1234567890abcdef0",[aws ec2 describe-instances],aw |
|
|
Stop EC2 instance,"aws ec2 stop-instances --instance-ids i-1234567890abcdef0",[aws ec2 start-instances --instance-ids i-1234567890abcdef0],aw |
|
|
Deploy with kubectl,"kubectl apply -f deployment.yaml",[],ku |
|
|
Get Kubernetes pods,"kubectl get pods",[kubectl apply -f deployment.yaml],ku |
|
|
Get all resources,"kubectl get all",[kubectl get pods],ku |
|
|
Describe Kubernetes pod,"kubectl describe pod pod-name",[kubectl get pods],ku |
|
|
View pod logs,"kubectl logs pod-name",[kubectl get pods],ku |
|
|
Follow pod logs,"kubectl logs -f pod-name",[kubectl logs pod-name],ku |
|
|
Execute in Kubernetes pod,"kubectl exec -it pod-name -- /bin/bash",[kubectl get pods],ku |
|
|
Delete Kubernetes resource,"kubectl delete -f deployment.yaml",[kubectl apply -f deployment.yaml],ku |
|
|
Get Kubernetes services,"kubectl get services",[kubectl get pods],ku |
|
|
Port forward Kubernetes,"kubectl port-forward pod-name 8080:80",[kubectl get pods],ku |
|
|
Get Kubernetes nodes,"kubectl get nodes",[kubectl get pods],ku |
|
|
View Kubernetes contexts,"kubectl config get-contexts",[],ku |
|
|
Switch Kubernetes context,"kubectl config use-context context-name",[kubectl config get-contexts],ku |
|
|
Create Kubernetes namespace,"kubectl create namespace namespace-name",[],ku |
|
|
Set default namespace,"kubectl config set-context --current --namespace=namespace-name",[kubectl create namespace namespace-name],ku |
|
|
Scale Kubernetes deployment,"kubectl scale deployment deployment-name --replicas=3",[kubectl get pods],ku |
|
|
Rollout Kubernetes deployment,"kubectl rollout restart deployment deployment-name",[kubectl scale deployment deployment-name --replicas=3],ku |
|
|
View rollout status,"kubectl rollout status deployment deployment-name",[kubectl rollout restart deployment deployment-name],ku |
|
|
View rollout history,"kubectl rollout history deployment deployment-name",[kubectl rollout status deployment deployment-name],ku |
|
|
Undo Kubernetes rollout,"kubectl rollout undo deployment deployment-name",[kubectl rollout history deployment deployment-name],ku |
|
|
Run Terraform init,"terraform init",[],te |
|
|
Plan Terraform changes,"terraform plan",[terraform init],te |
|
|
Apply Terraform,"terraform apply",[terraform plan],te |
|
|
Destroy Terraform resources,"terraform destroy",[terraform apply],te |
|
|
Format Terraform files,"terraform fmt",[terraform init],te |
|
|
Validate Terraform,"terraform validate",[terraform fmt],te |
|
|
Show Terraform state,"terraform show",[terraform apply],te |
|
|
List Terraform workspaces,"terraform workspace list",[terraform init],te |
|
|
Create Terraform workspace,"terraform workspace new workspace-name",[terraform workspace list],te |
|
|
Switch Terraform workspace,"terraform workspace select workspace-name",[terraform workspace new workspace-name],te |
|
|
Open file in vim,"vim file.txt",[],vi |
|
|
Open file in nano,"nano file.txt",[],na |
|
|
Open file in emacs,"emacs file.txt",[],em |
|
|
Open Visual Studio Code,"code .",[],co |
|
|
Open file in VS Code,"code file.txt",[code .],co |
|
|
Open folder in VS Code,"code folder/",[code .],co |
|
|
Install VS Code extension,"code --install-extension extension-id",[code .],co |
|
|
List VS Code extensions,"code --list-extensions",[code --install-extension extension-id],co |
|
|
Open diff in VS Code,"code --diff file1.txt file2.txt",[code .],co |
|
|
Install Node version manager,"curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash",[],cu |
|
|
List available Node versions,"nvm ls-remote",[],nv |
|
|
Install Node with nvm,"nvm install 18",[nvm ls-remote],nv |
|
|
Use specific Node version,"nvm use 18",[nvm install 18],nv |
|
|
Set default Node version,"nvm alias default 18",[nvm use 18],nv |
|
|
List installed Node versions,"nvm ls",[nvm install 18],nv |
|
|
Install latest Node,"nvm install node",[nvm ls],nv |
|
|
Install LTS Node,"nvm install --lts",[nvm ls],nv |
|
|
Uninstall Node version,"nvm uninstall 16",[nvm ls],nv |
|
|
Check current Node version,"nvm current",[nvm use 18],nv |
|
|
Install Python version manager,"curl https://pyenv.run | bash",[],cu |
|
|
List available Python versions,"pyenv install --list",[],py |
|
|
Install Python with pyenv,"pyenv install 3.11.0",[pyenv install --list],py |
|
|
Set global Python version,"pyenv global 3.11.0",[pyenv install 3.11.0],py |
|
|
Set local Python version,"pyenv local 3.11.0",[pyenv install 3.11.0],py |
|
|
List installed Python versions,"pyenv versions",[pyenv install 3.11.0],py |
|
|
Uninstall Python version,"pyenv uninstall 3.10.0",[pyenv versions],py |
|
|
Install Ruby version manager,"curl -sSL https://get.rvm.io | bash",[],cu |
|
|
List available Ruby versions,"rvm list known",[],rv |
|
|
Install Ruby with rvm,"rvm install 3.2.0",[rvm list known],rv |
|
|
Use specific Ruby version,"rvm use 3.2.0",[rvm install 3.2.0],rv |
|
|
Set default Ruby version,"rvm use 3.2.0 --default",[rvm use 3.2.0],rv |
|
|
List installed Ruby versions,"rvm list",[rvm install 3.2.0],rv |
|
|
Uninstall Ruby version,"rvm uninstall 3.1.0",[rvm list],rv |
|
|
Install rbenv,"brew install rbenv",[],br |
|
|
List Ruby versions rbenv,"rbenv install -l",[brew install rbenv],rb |
|
|
Install Ruby with rbenv,"rbenv install 3.2.0",[rbenv install -l],rb |
|
|
Set global Ruby rbenv,"rbenv global 3.2.0",[rbenv install 3.2.0],rb |
|
|
Set local Ruby rbenv,"rbenv local 3.2.0",[rbenv install 3.2.0],rb |
|
|
List installed Rubies rbenv,"rbenv versions",[rbenv install 3.2.0],rb |
|
|
Initialize rbenv,"rbenv init",[brew install rbenv],rb |
|
|
Rehash rbenv,"rbenv rehash",[gem install rails],rb |
|
|
Install Rust,"curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh",[],cu |
|
|
Update Rust,"rustup update",[],ru |
|
|
Set Rust toolchain,"rustup default stable",[rustup update],ru |
|
|
Add Rust target,"rustup target add wasm32-unknown-unknown",[],ru |
|
|
List Rust toolchains,"rustup show",[rustup update],ru |
|
|
Install nightly Rust,"rustup install nightly",[rustup show],ru |
|
|
Use nightly Rust,"rustup default nightly",[rustup install nightly],ru |
|
|
Check Rust version,"rustc --version",[rustup update],ru |
|
|
Install Java with SDKMAN,"curl -s """"https://get.sdkman.io"""" | bash",[],cu |
|
|
List Java versions,"sdk list java",[],sd |
|
|
Install Java version,"sdk install java 17.0.2-open",[sdk list java],sd |
|
|
Use Java version,"sdk use java 17.0.2-open",[sdk install java 17.0.2-open],sd |
|
|
Set default Java,"sdk default java 17.0.2-open",[sdk use java 17.0.2-open],sd |
|
|
List installed SDKs,"sdk current",[sdk install java 17.0.2-open],sd |
|
|
Run Node REPL,"node",[],no |
|
|
Execute Node file,"node script.js",[node],no |
|
|
Node with inspect,"node --inspect script.js",[node script.js],no |
|
|
Node with watch mode,"node --watch script.js",[node script.js],no |
|
|
Check Node version,"node --version",[],no |
|
|
Install Deno,"curl -fsSL https://deno.land/install.sh | sh",[],cu |
|
|
Run Deno script,"deno run script.ts",[],de |
|
|
Run Deno with permissions,"deno run --allow-net --allow-read script.ts",[deno run script.ts],de |
|
|
Deno format code,"deno fmt",[deno run script.ts],de |
|
|
Deno lint code,"deno lint",[deno fmt],de |
|
|
Deno run tests,"deno test",[deno lint],de |
|
|
Bundle Deno project,"deno bundle script.ts bundle.js",[deno run script.ts],de |
|
|
Install Deno deps,"deno cache deps.ts",[deno run script.ts],de |
|
|
Install Bun,"curl -fsSL https://bun.sh/install | bash",[],cu |
|
|
Run Bun script,"bun run script.ts",[],bu |
|
|
Install with Bun,"bun install",[bun run script.ts],bu |
|
|
Add package with Bun,"bun add package-name",[bun install],bu |
|
|
Run Bun tests,"bun test",[bun install],bu |
|
|
Build with Bun,"bun build ./index.ts --outdir ./dist",[bun test],bu |
|
|
Start PHP server,"php -S localhost:8000",[],ph |
|
|
Run PHP script,"php script.php",[php -S localhost:8000],ph |
|
|
Check PHP version,"php --version",[],ph |
|
|
Lint PHP file,"php -l file.php",[php script.php],ph |
|
|
Run Composer install,"composer install",[],co |
|
|
Update Composer packages,"composer update",[composer install],co |
|
|
Require package with Composer,"composer require vendor/package",[composer install],co |
|
|
Remove Composer package,"composer remove vendor/package",[composer require vendor/package],co |
|
|
Dump autoload,"composer dump-autoload",[composer install],co |
|
|
Create Laravel project,"composer create-project laravel/laravel project-name",[],co |
|
|
Start Laravel server,"php artisan serve",[composer create-project laravel/laravel project-name],ph |
|
|
Run Laravel migration,"php artisan migrate",[php artisan serve],ph |
|
|
Create Laravel controller,"php artisan make:controller ControllerName",[php artisan serve],ph |
|
|
Clear Laravel cache,"php artisan cache:clear",[php artisan serve],ph |
|
|
Run Symfony server,"symfony serve",[],sy |
|
|
Create Symfony project,"symfony new project-name",[],sy |
|
|
Run Symfony console,"php bin/console",[symfony new project-name],ph |
|
|
Install Maven dependencies,"mvn install",[],mv |
|
|
Run Maven tests,"mvn test",[mvn install],mv |
|
|
Clean Maven project,"mvn clean",[mvn install],mv |
|
|
Package Maven project,"mvn package",[mvn clean],mv |
|
|
Run Spring Boot,"mvn spring-boot:run",[mvn install],mv |
|
|
Run Gradle build,"gradle build",[],gr |
|
|
Run Gradle tests,"gradle test",[gradle build],gr |
|
|
Clean Gradle project,"gradle clean",[gradle build],gr |
|
|
Run Gradle task,"gradle taskName",[gradle build],gr |
|
|
List Gradle tasks,"gradle tasks",[gradle build],gr |
|
|
Run Gradle with daemon,"gradle --daemon build",[gradle build],gr |
|
|
Stop Gradle daemon,"gradle --stop",[gradle --daemon build],gr |
|
|
Check file encoding,"file -i file.txt",[cat file.txt],fi |
|
|
Convert file encoding,"iconv -f UTF-8 -t ISO-8859-1 input.txt > output.txt",[file -i file.txt],ic |
|
|
Convert line endings to Unix,"dos2unix file.txt",[file -i file.txt],do |
|
|
Convert line endings to Windows,"unix2dos file.txt",[dos2unix file.txt],un |
|
|
Check JSON syntax,"jq . file.json",[cat file.json],jq |
|
|
Pretty print JSON,"jq '.' file.json",[jq . file.json],jq |
|
|
Filter JSON field,"jq '.field' file.json",[jq '.' file.json],jq |
|
|
Parse JSON from curl,"curl https://api.example.com/data | jq '.'",[curl https: |
|
|
Validate YAML,"yamllint file.yaml",[cat file.yaml],ya |
|
|
Parse YAML with yq,"yq eval file.yaml",[yamllint file.yaml],yq |
|
|
Convert YAML to JSON,"yq eval -o=json file.yaml",[yq eval file.yaml],yq |
|
|
Edit YAML field,"yq eval '.field = """"value""""' -i file.yaml",[yq eval file.yaml],yq |
|
|
Parse XML with xmllint,"xmllint file.xml",[cat file.xml],xm |
|
|
Format XML,"xmllint --format file.xml",[xmllint file.xml],xm |
|
|
Validate XML,"xmllint --noout file.xml",[xmllint file.xml],xm |
|
|
XPath query,"xmllint --xpath '//node' file.xml",[xmllint file.xml],xm |
|
|
Check CSV file,"head -n 5 data.csv",[ls],he |
|
|
Count CSV rows,"wc -l data.csv",[head -n 5 data.csv],wc |
|
|
Convert CSV to JSON,"python -c """"import csv,json; print(json.dumps(list(csv.DictReader(open('data.csv')))))""""",[head -n 5 data.csv],py |
|
|
Run shellcheck,"shellcheck script.sh",[cat script.sh],sh |
|
|
Make script executable,"chmod +x script.sh",[cat script.sh],ch |
|
|
Run bash script,"./script.sh",[chmod +x script.sh],./ |
|
|
Run bash with debug,"bash -x script.sh",[./script.sh],ba |
|
|
Check bash syntax,"bash -n script.sh",[cat script.sh],ba |
|
|
Source bash script,"source script.sh",[cat script.sh],so |
|
|
Run zsh script,"zsh script.sh",[cat script.sh],zs |
|
|
Run fish shell,"fish",[],fi |
|
|
Set fish variable,"set -x VAR value",[fish],se |
|
|
Fish add to path,"fish_add_path /usr/local/bin",[fish],fi |
|
|
Configure fish,"fish_config",[fish],fi |
|
|
Install oh-my-zsh,"sh -c """"$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)""""",[],sh |
|
|
Update oh-my-zsh,"omz update",[],om |
|
|
Install zsh plugin,"git clone https://github.com/plugin/repo ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/name",[],gi |
|
|
Reload zsh config,"source ~/.zshrc",[],so |
|
|
Install tmux,"brew install tmux",[],br |
|
|
Start tmux session,"tmux",[brew install tmux],tm |
|
|
New tmux session with name,"tmux new -s session-name",[tmux],tm |
|
|
List tmux sessions,"tmux ls",[tmux new -s session-name],tm |
|
|
Attach to tmux session,"tmux attach -t session-name",[tmux ls],tm |
|
|
Kill tmux session,"tmux kill-session -t session-name",[tmux ls],tm |
|
|
Install screen,"brew install screen",[],br |
|
|
Start screen session,"screen",[brew install screen],sc |
|
|
New screen session with name,"screen -S session-name",[screen],sc |
|
|
List screen sessions,"screen -ls",[screen -S session-name],sc |
|
|
Attach to screen,"screen -r session-name",[screen -ls],sc |
|
|
Kill screen session,"screen -X -S session-name quit",[screen -ls],sc |
|
|
Run in background with nohup,"nohup command &",[],no |
|
|
Disown background job,"disown",[command &],di |
|
|
Check background with nohup,"cat nohup.out",[nohup command &],ca |
|
|
Run Apache server,"sudo apachectl start",[],ap |
|
|
Stop Apache server,"sudo apachectl stop",[sudo apachectl start],ap |
|
|
Restart Apache,"sudo apachectl restart",[sudo apachectl start],ap |
|
|
Check Apache config,"apachectl configtest",[sudo apachectl start],ap |
|
|
View Apache error log,"tail -f /var/log/apache2/error.log",[sudo apachectl start],ta |
|
|
Run Nginx,"sudo nginx",[],ng |
|
|
Stop Nginx,"sudo nginx -s stop",[sudo nginx],ng |
|
|
Reload Nginx config,"sudo nginx -s reload",[sudo nginx],ng |
|
|
Test Nginx config,"sudo nginx -t",[sudo nginx],ng |
|
|
View Nginx logs,"tail -f /var/log/nginx/access.log",[sudo nginx],ta |
|
|
Start Postgres server,"pg_ctl start -D /usr/local/var/postgres",[],pg |
|
|
Stop Postgres server,"pg_ctl stop -D /usr/local/var/postgres",[pg_ctl start -D /usr/local/var/postgres],pg |
|
|
Restart Postgres,"pg_ctl restart -D /usr/local/var/postgres",[pg_ctl start -D /usr/local/var/postgres],pg |
|
|
Check Postgres status,"pg_ctl status -D /usr/local/var/postgres",[pg_ctl start -D /usr/local/var/postgres],pg |
|
|
Start MySQL server,"mysql.server start",[],my |
|
|
Stop MySQL server,"mysql.server stop",[mysql.server start],my |
|
|
Restart MySQL,"mysql.server restart",[mysql.server start],my |
|
|
Check MySQL status,"mysql.server status",[mysql.server start],my |
|
|
Start MongoDB server,"mongod",[],mo |
|
|
Start MongoDB with config,"mongod --config /usr/local/etc/mongod.conf",[mongod],mo |
|
|
Stop MongoDB,"mongod --shutdown",[mongod],mo |
|
|
Start Redis server,"redis-server",[],re |
|
|
Start Redis with config,"redis-server /usr/local/etc/redis.conf",[redis-server],re |
|
|
Stop Redis,"redis-cli shutdown",[redis-server],re |
|
|
Check Redis ping,"redis-cli ping",[redis-server],re |
|
|
Start Elasticsearch,"elasticsearch",[],el |
|
|
Check Elasticsearch health,"curl -X GET """"localhost:9200/_cluster/health""""",[elasticsearch],cu |
|
|
List Elasticsearch indices,"curl -X GET """"localhost:9200/_cat/indices""""",[elasticsearch],cu |
|
|
Start RabbitMQ,"rabbitmq-server",[],ra |
|
|
Stop RabbitMQ,"rabbitmqctl stop",[rabbitmq-server],ra |
|
|
Check RabbitMQ status,"rabbitmqctl status",[rabbitmq-server],ra |
|
|
List RabbitMQ queues,"rabbitmqctl list_queues",[rabbitmq-server],ra |
|
|
Generate SSH key,"ssh-keygen -t ed25519 -C """"email@example.com""""",[],ss |
|
|
Copy SSH public key,"cat ~/.ssh/id_ed25519.pub | pbcopy",[ssh-keygen -t ed25519 -C "email@example.com"],ca |
|
|
Add SSH key to agent,"ssh-add ~/.ssh/id_ed25519",[ssh-keygen -t ed25519 -C "email@example.com"],ss |
|
|
List SSH keys in agent,"ssh-add -l",[ssh-add ~/.ssh/id_ed25519],ss |
|
|
Remove SSH key from agent,"ssh-add -d ~/.ssh/id_ed25519",[ssh-add -l],ss |
|
|
Test SSH connection,"ssh -T git@github.com",[ssh-add ~/.ssh/id_ed25519],ss |
|
|
Create SSH config,"nano ~/.ssh/config",[ssh-keygen -t ed25519 -C "email@example.com"],na |
|
|
Set SSH permissions,"chmod 600 ~/.ssh/config",[nano ~/.ssh/config],ch |
|
|
Generate GPG key,"gpg --full-generate-key",[],gp |
|
|
List GPG keys,"gpg --list-secret-keys --keyid-format=long",[gpg --full-generate-key],gp |
|
|
Export GPG public key,"gpg --armor --export key-id",[gpg --list-secret-keys --keyid-format=long],gp |
|
|
Import GPG key,"gpg --import key-file.asc",[],gp |
|
|
Delete GPG key,"gpg --delete-secret-key key-id",[gpg --list-secret-keys --keyid-format=long],gp |
|
|
Sign file with GPG,"gpg --sign file.txt",[gpg --full-generate-key],gp |
|
|
Verify GPG signature,"gpg --verify file.txt.sig",[gpg --sign file.txt],gp |
|
|
Encrypt file with GPG,"gpg --encrypt --recipient recipient@email.com file.txt",[gpg --full-generate-key],gp |
|
|
Decrypt GPG file,"gpg --decrypt file.txt.gpg",[gpg --encrypt --recipient recipient@email.com file.txt],gp |
|
|
Generate SSL certificate,"openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365",[],op |
|
|
Check SSL certificate,"openssl x509 -in cert.pem -text -noout",[openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365],op |
|
|
Convert PEM to DER,"openssl x509 -in cert.pem -outform der -out cert.der",[openssl x509 -in cert.pem -text -noout],op |
|
|
Test SSL connection,"openssl s_client -connect example.com:443",[],op |
|
|
Generate random password,"openssl rand -base64 32",[],op |
|
|
Create hash with OpenSSL,"openssl dgst -sha256 file.txt",[],op |
|
|
Benchmark system,"sysbench cpu run",[],sy |
|
|
Memory benchmark,"sysbench memory run",[sysbench cpu run],sy |
|
|
File IO benchmark,"sysbench fileio prepare",[sysbench cpu run],sy |
|
|
Run IO benchmark,"sysbench fileio --file-test-mode=seqwr run",[sysbench fileio prepare],sy |
|
|
Network speed test,"speedtest-cli",[],sp |
|
|
Check internet connectivity,"ping -c 3 8.8.8.8",[],pi |
|
|
Trace network route,"traceroute google.com",[ping -c 3 8.8.8.8],tr |
|
|
DNS lookup,"nslookup google.com",[],ns |
|
|
DNS lookup with dig,"dig google.com",[nslookup google.com],di |
|
|
Reverse DNS lookup,"dig -x 8.8.8.8",[dig google.com],di |
|
|
Query specific DNS server,"dig @8.8.8.8 google.com",[dig google.com],di |
|
|
Show DNS query time,"dig google.com +stats",[dig google.com],di |
|
|
Flush DNS cache macOS,"sudo dscacheutil -flushcache",[],ds |
|
|
Check open network connections,"netstat -an",[],ne |
|
|
Check listening ports,"netstat -tlnp",[netstat -an],ne |
|
|
Check network statistics,"netstat -s",[netstat -tlnp],ne |
|
|
Show routing table,"netstat -r",[netstat -s],ne |
|
|
Show network interfaces,"ip link show",[],ip |
|
|
Bring interface up,"sudo ip link set eth0 up",[ip link show],ip |
|
|
Bring interface down,"sudo ip link set eth0 down",[sudo ip link set eth0 up],ip |
|
|
Add IP address,"sudo ip addr add 192.168.1.100/24 dev eth0",[ip link show],ip |
|
|
Delete IP address,"sudo ip addr del 192.168.1.100/24 dev eth0",[sudo ip addr add 192.168.1.100/24 dev eth0],ip |
|
|
Show routing table with ip,"ip route show",[],ip |
|
|
Add route,"sudo ip route add 192.168.2.0/24 via 192.168.1.1",[ip route show],ip |
|
|
Delete route,"sudo ip route del 192.168.2.0/24",[sudo ip route add 192.168.2.0/24 via 192.168.1.1],ip |
|
|
Capture packets with tcpdump,"sudo tcpdump -i any",[],tc |
|
|
Capture to file,"sudo tcpdump -i any -w capture.pcap",[sudo tcpdump -i any],tc |
|
|
Read capture file,"tcpdump -r capture.pcap",[sudo tcpdump -i any -w capture.pcap],tc |
|
|
Filter by port,"sudo tcpdump -i any port 80",[sudo tcpdump -i any],tc |
|
|
Filter by host,"sudo tcpdump -i any host 192.168.1.1",[sudo tcpdump -i any],tc |
|
|
Capture HTTP traffic,"sudo tcpdump -i any -A port 80",[sudo tcpdump -i any port 80],tc |
|
|
Scan ports with nmap,"nmap 192.168.1.1",[],nm |
|
|
Scan all ports,"nmap -p- 192.168.1.1",[nmap 192.168.1.1],nm |
|
|
Scan with OS detection,"nmap -O 192.168.1.1",[nmap 192.168.1.1],nm |
|
|
Fast scan,"nmap -F 192.168.1.1",[nmap 192.168.1.1],nm |
|
|
Scan network range,"nmap 192.168.1.0/24",[nmap 192.168.1.1],nm |
|
|
Service version detection,"nmap -sV 192.168.1.1",[nmap 192.168.1.1],nm |
|
|
Stealth scan,"nmap -sS 192.168.1.1",[nmap 192.168.1.1],nm |
|
|
Load test with ab,"ab -n 1000 -c 10 http://localhost:8080/",[],ab |
|
|
Benchmark with wrk,"wrk -t4 -c100 -d30s http://localhost:8080",[],wr |
|
|
HTTP load test with siege,"siege -c 10 -t 30s http://localhost:8080",[],si |
|
|
Performance profile with perf,"perf record ./program",[],pe |
|
|
View perf report,"perf report",[perf record ./program],pe |
|
|
CPU profiling,"perf stat ./program",[perf record ./program],pe |
|
|
Memory profiling with valgrind,"valgrind --leak-check=full ./program",[],va |
|
|
Cache profiling,"valgrind --tool=cachegrind ./program",[valgrind --leak-check=full ./program],va |
|
|
Call graph profiling,"valgrind --tool=callgrind ./program",[valgrind --leak-check=full ./program],va |
|
|
Analyze callgrind output,"kcachegrind callgrind.out.123",[valgrind --tool=callgrind ./program],kc |
|
|
Heap profiling,"valgrind --tool=massif ./program",[valgrind --leak-check=full ./program],va |
|
|
Visualize massif output,"massif-visualizer massif.out.123",[valgrind --tool=massif ./program],ma |
|
|
Check system load,"uptime",[],up |
|
|
Watch system load,"watch -n 1 uptime",[uptime],wa |
|
|
Check CPU info,"lscpu",[],ls |
|
|
View CPU details,"cat /proc/cpuinfo",[lscpu],ca |
|
|
Check memory info,"cat /proc/meminfo",[free -h],ca |
|
|
View system hardware,"lshw",[],ls |
|
|
View PCI devices,"lspci",[lshw],ls |
|
|
View USB devices,"lsusb",[lspci],ls |
|
|
View block devices,"lsblk",[],ls |
|
|
Check disk health,"sudo smartctl -a /dev/sda",[lsblk],sm |
|
|
Monitor disk IO,"iostat",[],io |
|
|
Watch disk IO,"iostat -x 1",[iostat],io |
|
|
Network IO statistics,"iotop",[iostat],io |
|
|
Monitor with glances,"glances",[top],gl |
|
|
System monitor with nmon,"nmon",[glances],nm |
|
|
Check battery status,"pmset -g batt",[],pm |
|
|
View power settings,"pmset -g",[pmset -g batt],pm |
|
|
Prevent sleep,"caffeinate",[],ca |
|
|
Keep system awake,"caffeinate -u -t 3600",[caffeinate],ca |
|
|
Screen recording,"ffmpeg -f avfoundation -i """"0:0"""" output.mp4",[],ff |
|
|
Convert video format,"ffmpeg -i input.mp4 output.avi",[],ff |
|
|
Extract audio from video,"ffmpeg -i video.mp4 -vn audio.mp3",[ffmpeg -i input.mp4 output.avi],ff |
|
|
Resize video,"ffmpeg -i input.mp4 -vf scale=1280:720 output.mp4",[ffmpeg -i input.mp4 output.avi],ff |
|
|
Compress video,"ffmpeg -i input.mp4 -crf 28 output.mp4",[ffmpeg -i input.mp4 output.avi],ff |
|
|
Trim video,"ffmpeg -i input.mp4 -ss 00:01:00 -to 00:02:00 output.mp4",[ffmpeg -i input.mp4 output.avi],ff |
|
|
Concatenate videos,"ffmpeg -f concat -i list.txt -c copy output.mp4",[ffmpeg -i input.mp4 output.avi],ff |
|
|
Convert image format,"convert input.jpg output.png",[],co |
|
|
Resize image,"convert input.jpg -resize 800x600 output.jpg",[convert input.jpg output.png],co |
|
|
Rotate image,"convert input.jpg -rotate 90 output.jpg",[convert input.jpg output.png],co |
|
|
Compress image,"convert input.jpg -quality 85 output.jpg",[convert input.jpg output.png],co |
|
|
Batch convert images,"mogrify -format png *.jpg",[convert input.jpg output.png],mo |
|
|
Add watermark to image,"convert input.jpg -pointsize 36 -draw """"text 10,50 'Watermark'"""" output.jpg",[convert input.jpg output.png],co |
|
|
Create thumbnail,"convert input.jpg -thumbnail 200x200 thumb.jpg",[convert input.jpg output.png],co |
|
|
Optimize PNG,"optipng image.png",[convert input.jpg output.png],op |
|
|
Optimize JPEG,"jpegoptim image.jpg",[optipng image.png],jp |
|
|
PDF to images,"convert document.pdf page-%d.png",[],co |
|
|
Images to PDF,"convert *.jpg output.pdf",[convert document.pdf page-%d.png],co |
|
|
Merge PDF files,"pdfunite file1.pdf file2.pdf merged.pdf",[],pd |
|
|
Split PDF,"pdfseparate input.pdf output-%d.pdf",[pdfunite file1.pdf file2.pdf merged.pdf],pd |
|
|
Compress PDF,"gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf",[],gs |
|
|
Extract text from PDF,"pdftotext document.pdf",[],pd |
|
|
PDF to HTML,"pdftohtml document.pdf",[pdftotext document.pdf],pd |
|
|
Count PDF pages,"pdfinfo document.pdf | grep Pages",[pdftotext document.pdf],pd |
|
|
Encrypt PDF,"qpdf --encrypt password password 256 -- input.pdf output.pdf",[],qp |
|
|
Decrypt PDF,"qpdf --decrypt --password=password input.pdf output.pdf",[qpdf --encrypt password password 256 -- input.pdf output.pdf],qp |
|
|
Generate QR code,"qrencode -o qrcode.png """"https://example.com""""",[],qr |
|
|
Decode QR code,"zbarimg qrcode.png",[qrencode -o qrcode.png "https://example.com"],zb |
|
|
Convert markdown to HTML,"pandoc README.md -o output.html",[],pa |
|
|
Convert markdown to PDF,"pandoc README.md -o output.pdf",[pandoc README.md -o output.html],pa |
|
|
Convert HTML to markdown,"pandoc input.html -o output.md",[pandoc README.md -o output.html],pa |
|
|
Create presentation from markdown,"pandoc slides.md -o slides.pptx",[pandoc README.md -o output.html],pa |
|
|
Run local HTTP server,"python -m http.server 8000",[],py |
|
|
Run HTTP server on port,"python -m http.server 3000",[python -m http.server 8000],py |
|
|
PHP built-in server,"php -S 0.0.0.0:8000",[],ph |
|
|
Ruby HTTP server,"ruby -run -e httpd . -p 8000",[],ru |
|
|
Node HTTP server,"npx http-server",[],np |
|
|
Node HTTP server with port,"npx http-server -p 3000",[npx http-server],np |
|
|
Serve with live reload,"npx live-server",[npx http-server],np |
|
|
Check command timing,"time ls -la",[],ti |
|
|
Profile shell script,"time bash script.sh",[time ls -la],ti |
|
|
Show calendar for year,"cal 2024",[cal],ca |
|
|
Show specific month calendar,"cal 01 2024",[cal 2024],ca |
|
|
Add days to date,"date -d """"+5 days""""",[date],da |
|
|
Subtract days from date,"date -d """"-5 days""""",[date -d "+5 days"],da |
|
|
Get timestamp,"date +%s",[date],da |
|
|
Convert timestamp,"date -d @1609459200",[date +%s],da |
|
|
Get week number,"date +%V",[date],da |
|
|
Calculate between dates,"datediff 2024-01-01 2024-12-31",[date],da |
|
|
Timer countdown,"sleep 10 && echo """"Done""""",[],sl |
|
|
Run every N seconds,"watch -n 5 'date'",[],wa |
|
|
Countdown timer,"for i in {10..1}; do echo $i; sleep 1; done && echo """"Time's up!""""",[],fo |
|
|
Set reminder,"echo """"meeting"""" | at 14:00",[],ec |
|
|
Interactive calculator,"bc -l",[],bc |
|
|
Quick math,"echo """"scale=2; 10/3"""" | bc",[bc -l],ec |
|
|
Hex to decimal,"echo """"ibase=16; FF"""" | bc",[bc -l],ec |
|
|
Decimal to hex,"echo """"obase=16; 255"""" | bc",[bc -l],ec |
|
|
Binary to decimal,"echo """"ibase=2; 11111111"""" | bc",[bc -l],ec |
|
|
Check if port is open,"nc -zv localhost 8080",[],nc |
|
|
Send data to port,"echo """"test"""" | nc localhost 8080",[nc -zv localhost 8080],ec |
|
|
Listen on port,"nc -l 8080",[nc -zv localhost 8080],nc |
|
|
Transfer file via netcat,"nc -l 9999 > received.txt",[nc -l 8080],nc |
|
|
Chat with netcat,"nc -l 8080",[nc -l 8080],nc |
|
|
Run HTTP request with telnet,"telnet example.com 80",[],te |
|
|
Check SMTP connection,"telnet mail.example.com 25",[telnet example.com 80],te |
|
|
Test FTP connection,"telnet ftp.example.com 21",[telnet example.com 80],te |
|
|
Generate random string,"cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1",[],ca |
|
|
Generate secure random,"openssl rand -hex 16",[],op |
|
|
Create dummy file,"dd if=/dev/zero of=dummy.dat bs=1M count=100",[],dd |
|
|
Create sparse file,"truncate -s 1G sparse.dat",[dd if=/dev/zero of=dummy.dat bs=1M count=100],tr |
|
|
Check file system type,"df -T",[df -h],df |
|
|
Mount filesystem,"sudo mount /dev/sdb1 /mnt",[],mo |
|
|
Unmount filesystem,"sudo umount /mnt",[sudo mount /dev/sdb1 /mnt],um |
|
|
Check mount points,"mount | grep /mnt",[sudo mount /dev/sdb1 /mnt],mo |
|
|
List mounted filesystems,"findmnt",[mount | grep /mnt],fi |
|
|
Format disk,"sudo mkfs.ext4 /dev/sdb1",[],mk |
|
|
Check filesystem,"sudo fsck /dev/sdb1",[sudo mkfs.ext4 /dev/sdb1],fs |
|
|
Repair filesystem,"sudo fsck -y /dev/sdb1",[sudo fsck /dev/sdb1],fs |
|
|
Clone disk with dd,"sudo dd if=/dev/sda of=/dev/sdb bs=64K conv=noerror,sync",[],dd |
|
|
Create disk image,"sudo dd if=/dev/sda of=backup.img bs=4M",[],dd |
|
|
Restore disk image,"sudo dd if=backup.img of=/dev/sda bs=4M",[sudo dd if=/dev/sda of=backup.img bs=4M],dd |
|
|
Wipe disk securely,"sudo dd if=/dev/urandom of=/dev/sdb bs=4M",[],dd |
|
|
Zero out disk,"sudo dd if=/dev/zero of=/dev/sdb bs=4M",[],dd |
|
|
Check partition table,"sudo fdisk -l",[],fd |
|
|
Create partition,"sudo fdisk /dev/sdb",[sudo fdisk -l],fd |
|
|
View partitions,"lsblk -f",[sudo fdisk -l],ls |
|
|
Resize partition,"sudo resize2fs /dev/sdb1",[],re |
|
|
Check inode usage,"df -i",[df -h],df |
|
|
Find inode number,"ls -i file.txt",[ls -la],ls |
|
|
Find files by inode,"find . -inum 12345",[ls -i file.txt],fi |
|
|
Check file access time,"stat -c %x file.txt",[stat file.txt],st |
|
|
Check file modify time,"stat -c %y file.txt",[stat file.txt],st |
|
|
Check file change time,"stat -c %z file.txt",[stat file.txt],st |
|
|
Update access time,"touch -a file.txt",[stat -c %x file.txt],to |
|
|
Update modify time,"touch -m file.txt",[touch -a file.txt],to |
|
|
Set specific timestamp,"touch -t 202401011200 file.txt",[touch -m file.txt],to |
|
|
Bulk rename files,"rename 's/\.txt$/\.md/' *.txt",[ls],re |
|
|
Rename with pattern,"for f in *.txt; do mv """"$f"""" """"${f%.txt}.md""""; done",[ls],fo |
|
|
Number files sequentially,"count=1; for f in *.jpg; do mv """"$f"""" """"image_$count.jpg""""; ((count++)); done",[ls],co |
|
|
Convert filenames to lowercase,"rename 'y/A-Z/a-z/' *",[ls],re |
|
|
Remove spaces from filenames,"rename 's/ /_/g' *",[ls],re |
|
|
Preview rename operation,"rename -n 's/old/new/' *",[ls],re |
|
|
Create cron job,"echo """"0 2 * * * /path/to/script.sh"""" | crontab -",[],ec |
|
|
Edit crontab,"EDITOR=nano crontab -e",[crontab -l],ED |
|
|
View cron logs,"grep CRON /var/log/syslog",[crontab -l],gr |
|
|
Run script at startup,"echo """"@reboot /path/to/script.sh"""" | crontab -",[crontab -l],ec |
|
|
Schedule weekly job,"echo """"0 2 * * 0 /path/to/script.sh"""" | crontab -",[crontab -l],ec |
|
|
Schedule monthly job,"echo """"0 2 1 * * /path/to/script.sh"""" | crontab -",[crontab -l],ec |
|
|
List user processes,"ps -u $USER",[ps aux],ps |
|
|
Sort processes by memory,"ps aux --sort=-%mem | head",[ps aux],ps |
|
|
Sort processes by CPU,"ps aux --sort=-%cpu | head",[ps aux --sort=-%mem | head],ps |
|
|
Find zombie processes,"ps aux | awk '$8==""""Z""""'",[ps aux],ps |
|
|
View process threads,"ps -eLf",[ps aux],ps |
|
|
Check process priority,"ps -eo pid,ni,comm",[ps aux],ps |
|
|
Change process priority,"renice -n 10 -p 1234","[ps -eo pid,ni,comm]",re |
|
|
Set process nice value,"nice -n 10 command",[renice -n 10 -p 1234],ni |
|
|
View process limits,"ulimit -a",[],ul |
|
|
Set max open files,"ulimit -n 4096",[ulimit -a],ul |
|
|
Set core dump size,"ulimit -c unlimited",[ulimit -a],ul |
|
|
Disable core dumps,"ulimit -c 0",[ulimit -c unlimited],ul |
|
|
View current shell,"echo $SHELL",[],ec |
|
|
List available shells,"cat /etc/shells",[echo $SHELL],ca |
|
|
Change default shell,"chsh -s /bin/zsh",[cat /etc/shells],ch |
|
|
Test network bandwidth,"iperf3 -s",[],ip |
|
|
Client bandwidth test,"iperf3 -c server-ip",[iperf3 -s],ip |
|
|
Reverse bandwidth test,"iperf3 -c server-ip -R",[iperf3 -c server-ip],ip |
|
|
UDP bandwidth test,"iperf3 -c server-ip -u",[iperf3 -c server-ip],ip |
|
|
Parallel streams test,"iperf3 -c server-ip -P 4",[iperf3 -c server-ip],ip |
|
|
Check SSL certificate expiry,"echo | openssl s_client -connect example.com:443 2>/dev/null | openssl x509 -noout -dates",[],ec |
|
|
View certificate chain,"openssl s_client -showcerts -connect example.com:443",[],op |
|
|
Generate CSR,"openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr",[],op |
|
|
Verify CSR,"openssl req -text -noout -verify -in server.csr",[openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr],op |
|
|
Check certificate and key match,"openssl x509 -noout -modulus -in cert.pem | openssl md5",[],op |
|
|
Convert PFX to PEM,"openssl pkcs12 -in cert.pfx -out cert.pem -nodes",[],op |
|
|
Convert PEM to PFX,"openssl pkcs12 -export -out cert.pfx -inkey key.pem -in cert.pem",[],op |
|
|
List loaded kernel modules,"lsmod",[],ls |
|
|
Load kernel module,"sudo modprobe module-name",[lsmod],mo |
|
|
Unload kernel module,"sudo rmmod module-name",[lsmod],rm |
|
|
View kernel messages,"dmesg | tail",[],dm |
|
|
Watch kernel messages,"dmesg -w",[dmesg | tail],dm |
|
|
Clear kernel ring buffer,"sudo dmesg -c",[dmesg | tail],dm |
|
|
Check kernel version,"uname -r",[uname -a],un |
|
|
View kernel parameters,"sysctl -a",[],sy |
|
|
Set kernel parameter,"sudo sysctl -w parameter=value",[sysctl -a],sy |
|
|
Make sysctl persistent,"echo """"parameter=value"""" | sudo tee -a /etc/sysctl.conf",[sudo sysctl -w parameter=value],ec |
|
|
Reload sysctl config,"sudo sysctl -p",[echo "parameter=value" | sudo tee -a /etc/sysctl.conf],sy |
|
|
Create swap file,"sudo fallocate -l 2G /swapfile",[],fa |
|
|
Set swap permissions,"sudo chmod 600 /swapfile",[sudo fallocate -l 2G /swapfile],ch |
|
|
Make swap,"sudo mkswap /swapfile",[sudo chmod 600 /swapfile],mk |
|
|
Enable swap,"sudo swapon /swapfile",[sudo mkswap /swapfile],sw |
|
|
Disable swap,"sudo swapoff /swapfile",[sudo swapon /swapfile],sw |
|
|
View swap usage,"swapon --show",[sudo swapon /swapfile],sw |
|
|
Check swap priority,"cat /proc/swaps",[swapon --show],ca |
|
|
Set swap priority,"sudo swapon -p 10 /swapfile",[swapon --show],sw |
|
|
Analyze core dump,"gdb program core",[],gd |
|
|
Start GDB debugger,"gdb ./program",[gdb program core],gd |
|
|
Run program in GDB,"run",[gdb ./program],ru |
|
|
Set breakpoint in GDB,"break main",[gdb ./program],br |
|
|
Continue execution,"continue",[break main],co |
|
|
Step over in GDB,"next",[continue],ne |
|
|
Step into in GDB,"step",[next],st |
|
|
Print variable in GDB,"print variable_name",[step],pr |
|
|
Backtrace in GDB,"backtrace",[print variable_name],ba |
|
|
Quit GDB,"quit",[gdb ./program],qu |
|
|
Debug with LLDB,"lldb ./program",[],ll |
|
|
Run in LLDB,"run",[lldb ./program],ru |
|
|
Set breakpoint LLDB,"breakpoint set --name main",[lldb ./program],br |
|
|
Continue in LLDB,"continue",[breakpoint set --name main],co |
|
|
Step over in LLDB,"next",[continue],ne |
|
|
Print variable LLDB,"print variable_name",[next],pr |
|
|
Attach to process,"gdb -p 1234",[ps aux],gd |
|
|
Detach from process,"detach",[gdb -p 1234],de |
|
|
Disassemble function,"disassemble function_name",[gdb ./program],di |
|
|
View registers,"info registers",[gdb ./program],in |
|
|
View memory,"x/10x 0x7fffffffe000",[info registers],x |
|
|
Set watchpoint,"watch variable_name",[gdb ./program],wa |
|
|
Create archive with compression,"tar -czf archive.tar.gz --exclude='node_modules' folder",[tar -czf archive.tar.gz folder],ta |
|
|
Extract specific file from tar,"tar -xzf archive.tar.gz path/to/file",[tar -czf archive.tar.gz folder],ta |
|
|
List tar with details,"tar -tvzf archive.tar.gz",[tar -tzf archive.tar.gz],ta |
|
|
Append to tar,"tar -rzf archive.tar.gz newfile.txt",[tar -czf archive.tar.gz folder],ta |
|
|
Create bzip2 archive,"tar -cjf archive.tar.bz2 folder",[tar -czf archive.tar.gz folder],ta |
|
|
Extract bzip2 archive,"tar -xjf archive.tar.bz2",[tar -cjf archive.tar.bz2 folder],ta |
|
|
Create xz archive,"tar -cJf archive.tar.xz folder",[tar -cjf archive.tar.bz2 folder],ta |
|
|
Extract xz archive,"tar -xJf archive.tar.xz",[tar -cJf archive.tar.xz folder],ta |
|
|
Compress with gzip,"gzip file.txt",[],gz |
|
|
Decompress gzip,"gunzip file.txt.gz",[gzip file.txt],gu |
|
|
Keep original when gzipping,"gzip -k file.txt",[gzip file.txt],gz |
|
|
Compress with bzip2,"bzip2 file.txt",[gzip file.txt],bz |
|
|
Decompress bzip2,"bunzip2 file.txt.bz2",[bzip2 file.txt],bu |
|
|
Compress with xz,"xz file.txt",[bzip2 file.txt],xz |
|
|
Decompress xz,"unxz file.txt.xz",[xz file.txt],un |
|
|
Test archive integrity,"tar -tzf archive.tar.gz > /dev/null",[tar -czf archive.tar.gz folder],ta |
|
|
Compare archives,"diff <(tar -tzf archive1.tar.gz) <(tar -tzf archive2.tar.gz)",[tar -czf archive.tar.gz folder],di |
|
|
Run npm ci,"npm ci",[npm install],np |
|
|
Lock npm dependencies,"npm shrinkwrap",[npm install],np |
|
|
View npm package info,"npm info package-name",[npm list],np |
|
|
View package versions,"npm view package-name versions",[npm info package-name],np |
|
|
Check npm registry,"npm config get registry",[npm install],np |
|
|
Login to npm,"npm login",[],np |
|
|
Publish npm package,"npm publish",[npm login],np |
|
|
Unpublish npm package,"npm unpublish package-name@version",[npm publish],np |
|
|
Deprecate npm version,"npm deprecate package-name@version """"message""""",[npm publish],np |
|
|
Link npm package locally,"npm link",[],np |
|
|
Use linked package,"npm link package-name",[npm link],np |
|
|
Unlink package,"npm unlink package-name",[npm link package-name],np |
|
|
Run npm scripts in parallel,"npm-run-all --parallel script1 script2",[npm install],np |
|
|
Run npm scripts sequentially,"npm-run-all script1 script2",[npm install],np |
|
|
Check yarn version,"yarn --version",[],ya |
|
|
Set yarn version,"yarn set version stable",[yarn --version],ya |
|
|
Clear yarn cache,"yarn cache clean",[yarn install],ya |
|
|
Check yarn cache location,"yarn cache dir",[yarn cache clean],ya |
|
|
Yarn workspaces install,"yarn workspaces run install",[yarn init],ya |
|
|
Run script in all workspaces,"yarn workspaces run build",[yarn workspaces run install],ya |
|
|
Add workspace dependency,"yarn workspace package-name add dependency",[yarn workspaces run install],ya |
|
|
View pnpm store,"pnpm store path",[pnpm install package-name],pn |
|
|
Clean pnpm store,"pnpm store prune",[pnpm store path],pn |
|
|
Import from package-lock,"pnpm import",[npm install],pn |
|
|
Run pnpm workspace,"pnpm -r run build",[pnpm install],pn |
|
|
Filter pnpm workspace,"pnpm --filter package-name build",[pnpm -r run build],pn |
|
|
Show pip vulnerabilities,"pip-audit",[pip list],pi |
|
|
Create requirements lock,"pip-compile requirements.in",[pip freeze > requirements.txt],pi |
|
|
Sync from lock file,"pip-sync requirements.txt",[pip-compile requirements.in],pi |
|
|
Install pip tools,"pip install pip-tools",[pip list],pi |
|
|
Upgrade all pip packages,"pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U",[pip list],pi |
|
|
Show pip package files,"pip show --files package-name",[pip show package-name],pi |
|
|
Check pip package license,"pip-licenses",[pip list],pi |
|
|
Install from git,"pip install git+https://github.com/user/repo.git",[pip install package-name],pi |
|
|
Install editable package,"pip install -e .",[],pi |
|
|
Uninstall with dependencies,"pip-autoremove package-name",[pip uninstall package-name],pi |
|
|
Create Python package,"python setup.py sdist bdist_wheel",[],py |
|
|
Upload to PyPI,"twine upload dist/*",[python setup.py sdist bdist_wheel],tw |
|
|
Check Python package,"twine check dist/*",[python setup.py sdist bdist_wheel],tw |
|
|
Install poetry,"curl -sSL https://install.python-poetry.org | python3 -",[],cu |
|
|
Init poetry project,"poetry init",[],po |
|
|
Install with poetry,"poetry install",[poetry init],po |
|
|
Add package with poetry,"poetry add package-name",[poetry install],po |
|
|
Remove package poetry,"poetry remove package-name",[poetry add package-name],po |
|
|
Update poetry packages,"poetry update",[poetry install],po |
|
|
Show poetry dependencies,"poetry show",[poetry install],po |
|
|
Run with poetry,"poetry run python script.py",[poetry install],po |
|
|
Build with poetry,"poetry build",[poetry install],po |
|
|
Publish with poetry,"poetry publish",[poetry build],po |
|
|
Create poetry shell,"poetry shell",[poetry install],po |
|
|
Check Ruby version,"ruby --version",[],ru |
|
|
Install bundler,"gem install bundler",[],ge |
|
|
Create Gemfile,"bundle init",[gem install bundler],bu |
|
|
Check bundle outdated,"bundle outdated",[bundle install],bu |
|
|
Update bundle gem,"bundle update gem-name",[bundle install],bu |
|
|
Show bundle dependencies,"bundle show",[bundle install],bu |
|
|
Check bundle security,"bundle audit",[bundle install],bu |
|
|
Install specific gem version,"gem install gem-name -v 1.2.3",[gem install gem-name],ge |
|
|
List gem versions,"gem list gem-name --remote --all",[gem install gem-name],ge |
|
|
Cleanup old gems,"gem cleanup",[gem list],ge |
|
|
Build gem,"gem build gemspec.gemspec",[],ge |
|
|
Push gem to RubyGems,"gem push gem-file.gem",[gem build gemspec.gemspec],ge |
|
|
Generate gem documentation,"gem rdoc --all",[gem list],ge |
|
|
Install Rails,"gem install rails",[gem install bundler],ge |
|
|
Create Rails app,"rails new app-name",[gem install rails],ra |
|
|
Generate Rails scaffold,"rails generate scaffold Model field:type",[rails new app-name],ra |
|
|
Destroy Rails scaffold,"rails destroy scaffold Model",[rails generate scaffold Model field:type],ra |
|
|
View Rails routes,"rails routes",[rails server],ra |
|
|
Test Rails routes,"rails routes | grep pattern",[rails routes],ra |
|
|
Create Rails database,"rails db:create",[rails new app-name],ra |
|
|
Drop Rails database,"rails db:drop",[rails db:create],ra |
|
|
Seed Rails database,"rails db:seed",[rails db:migrate],ra |
|
|
Reset Rails database,"rails db:reset",[rails db:migrate],ra |
|
|
View Rails environment,"rails about",[rails server],ra |
|
|
Precompile Rails assets,"rails assets:precompile",[rails server],ra |
|
|
Clean Rails assets,"rails assets:clean",[rails assets:precompile],ra |
|
|
Run Rails tasks,"rails -T",[rails server],ra |
|
|
Install cargo-watch,"cargo install cargo-watch",[cargo build],ca |
|
|
Watch Rust project,"cargo watch -x run",[cargo install cargo-watch],ca |
|
|
Generate Rust docs,"cargo doc",[cargo build],ca |
|
|
Open Rust docs,"cargo doc --open",[cargo doc],ca |
|
|
Publish Rust crate,"cargo publish",[cargo build],ca |
|
|
Yank Rust version,"cargo yank --vers 1.0.0",[cargo publish],ca |
|
|
Search Rust crates,"cargo search search-term",[],ca |
|
|
Check Rust outdated,"cargo outdated",[cargo build],ca |
|
|
Expand Rust macros,"cargo expand",[cargo build],ca |
|
|
Check unused deps,"cargo udeps",[cargo build],ca |
|
|
Benchmark Rust,"cargo bench",[cargo test],ca |
|
|
Profile Rust build,"cargo build --timings",[cargo build],ca |
|
|
Run Go benchmarks,"go test -bench=.",[go test ./..],go |
|
|
Run Go with race detector,"go test -race ./..",[go test ./..],go |
|
|
Profile Go CPU,"go test -cpuprofile=cpu.prof",[go test ./..],go |
|
|
Profile Go memory,"go test -memprofile=mem.prof",[go test ./..],go |
|
|
View Go profile,"go tool pprof cpu.prof",[go test -cpuprofile=cpu.prof],go |
|
|
Install Go tools,"go install golang.org/x/tools/cmd/goimports@latest",[],go |
|
|
Format imports,"goimports -w .",[go install golang.org/x/tools/cmd/goimports@latest],go |
|
|
Run golangci-lint,"golangci-lint run",[go build],go |
|
|
Generate Go code,"go generate ./..",[],go |
|
|
View Go documentation,"go doc package",[],go |
|
|
Run Go package server,"godoc -http=:6060",[],go |
|
|
Clean Go build cache,"go clean -cache",[go build],go |
|
|
Clean Go test cache,"go clean -testcache",[go clean -cache],go |
|
|
Vendor Go dependencies,"go mod vendor",[go mod tidy],go |
|
|
Verify Go dependencies,"go mod verify",[go mod tidy],go |
|
|
Why Go dependency,"go mod why package",[go mod tidy],go |
|
|
View Go env,"go env",[],go |
|
|
Set Go env var,"go env -w GOBIN=/path/to/bin",[go env],go |
|
|
Run Java from JAR,"java -jar application.jar",[mvn package],ja |
|
|
Run Java with classpath,"java -cp """"lib/*"""" MainClass",[mvn package],ja |
|
|
Set Java heap size,"java -Xmx2g -Xms512m -jar app.jar",[java -jar application.jar],ja |
|
|
Enable Java debugging,"java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -jar app.jar",[java -jar application.jar],ja |
|
|
Generate Java heap dump,"jmap -dump:live,format=b,file=heap.bin PID",[java -jar application.jar],jm |
|
|
View Java heap histogram,"jmap -histo PID","[jmap -dump:live,format=b,file=heap.bin PID]",jm |
|
|
View Java threads,"jstack PID",[java -jar application.jar],js |
|
|
Monitor Java JVM,"jstat -gc PID 1000",[java -jar application.jar],js |
|
|
View Java process info,"jinfo PID",[java -jar application.jar],ji |
|
|
Flight recorder,"java -XX:+FlightRecorder -XX:StartFlightRecording=duration=60s,filename=recording.jfr -jar app.jar",[java -jar application.jar],ja |
|
|
Analyze heap dump,"jhat heap.bin","[jmap -dump:live,format=b,file=heap.bin PID]",jh |
|
|
Run Scala REPL,"scala",[],sc |
|
|
Compile Scala,"scalac HelloWorld.scala",[],sc |
|
|
Run Scala program,"scala HelloWorld",[scalac HelloWorld.scala],sc |
|
|
Install sbt,"brew install sbt",[],br |
|
|
Run sbt console,"sbt console",[brew install sbt],sb |
|
|
Compile with sbt,"sbt compile",[brew install sbt],sb |
|
|
Run with sbt,"sbt run",[sbt compile],sb |
|
|
Test with sbt,"sbt test",[sbt compile],sb |
|
|
Package with sbt,"sbt package",[sbt compile],sb |
|
|
Create sbt project,"sbt new scala/scala-seed.g8",[brew install sbt],sb |
|
|
Search with ripgrep,"rg """"pattern""""",[],rg |
|
|
Search case insensitive,"rg -i """"pattern""""",[rg "pattern"],rg |
|
|
Search specific file types,"rg -t js """"pattern""""",[rg "pattern"],rg |
|
|
Search multiple file types,"rg -t js -t ts """"pattern""""",[rg -t js "pattern"],rg |
|
|
Exclude file type,"rg -T js """"pattern""""",[rg "pattern"],rg |
|
|
Search with line numbers,"rg -n """"pattern""""",[rg "pattern"],rg |
|
|
Search without line numbers,"rg -N """"pattern""""",[rg -n "pattern"],rg |
|
|
Show only matching files,"rg -l """"pattern""""",[rg "pattern"],rg |
|
|
Show files without matches,"rg --files-without-match """"pattern""""",[rg -l "pattern"],rg |
|
|
Count matches per file,"rg -c """"pattern""""",[rg "pattern"],rg |
|
|
Show context lines,"rg -C 3 """"pattern""""",[rg "pattern"],rg |
|
|
Show lines before match,"rg -B 3 """"pattern""""",[rg -C 3 "pattern"],rg |
|
|
Show lines after match,"rg -A 3 """"pattern""""",[rg -C 3 "pattern"],rg |
|
|
Search hidden files,"rg --hidden """"pattern""""",[rg "pattern"],rg |
|
|
Search without respecting gitignore,"rg --no-ignore """"pattern""""",[rg "pattern"],rg |
|
|
Search all files including ignored,"rg -uuu """"pattern""""",[rg --no-ignore "pattern"],rg |
|
|
Follow symbolic links,"rg -L """"pattern""""",[rg "pattern"],rg |
|
|
Search in specific directory,"rg """"pattern"""" src/",[rg "pattern"],rg |
|
|
Search in multiple directories,"rg """"pattern"""" src/ tests/",[rg "pattern" src/],rg |
|
|
Search with regex,"rg """"function\s+\w+"""" ",[rg "pattern"],rg |
|
|
Search whole words only,"rg -w """"word""""",[rg "pattern"],rg |
|
|
Invert match,"rg -v """"pattern""""",[rg "pattern"],rg |
|
|
Search with fixed strings,"rg -F """"literal.string""""",[rg "pattern"],rg |
|
|
Search multiple patterns,"rg -e """"pattern1"""" -e """"pattern2""""",[rg "pattern"],rg |
|
|
Search from pattern file,"rg -f patterns.txt",[rg "pattern"],rg |
|
|
Replace text preview,"rg """"old"""" -r """"new""""",[rg "pattern"],rg |
|
|
Replace and save,"rg """"old"""" -r """"new"""" --passthru > file.txt",[rg "old" -r "new"],rg |
|
|
Search with glob pattern,"rg """"pattern"""" -g """"*.js""""",[rg "pattern"],rg |
|
|
Exclude with glob,"rg """"pattern"""" -g """"!test*""""",[rg "pattern" -g "*.js"],rg |
|
|
Search only in tracked files,"rg --no-ignore-vcs """"pattern""""",[rg "pattern"],rg |
|
|
Show column numbers,"rg --column """"pattern""""",[rg -n "pattern"],rg |
|
|
Search with max depth,"rg --max-depth 2 """"pattern""""",[rg "pattern"],rg |
|
|
Show file types,"rg --type-list",[],rg |
|
|
Search multiline,"rg -U """"pattern.*\n.*pattern""""",[rg "pattern"],rg |
|
|
Search with PCRE2,"rg -P """"(?<=function\s)\w+""""",[rg "pattern"],rg |
|
|
Show statistics,"rg --stats """"pattern""""",[rg "pattern"],rg |
|
|
Output as JSON,"rg --json """"pattern""""",[rg "pattern"],rg |
|
|
Pretty print with colors,"rg --color always """"pattern""""",[rg "pattern"],rg |
|
|
Disable colors,"rg --color never """"pattern""""",[rg --color always "pattern"],rg |
|
|
Search binary files,"rg -a """"pattern""""",[rg "pattern"],rg |
|
|
Search compressed files,"rg -z """"pattern""""",[rg "pattern"],rg |
|
|
Show only matches,"rg -o """"pattern""""",[rg "pattern"],rg |
|
|
Search with null separator,"rg -0 """"pattern""""",[rg "pattern"],rg |
|
|
Replace with backreferences,"rg """"(\w+)=(\w+)"""" -r """"$2=$1""""",[rg "old" -r "new"],rg |
|
|
Search with smart case,"rg -S """"Pattern""""",[rg -i "pattern"],rg |
|
|
Sort results by path,"rg --sort path """"pattern""""",[rg "pattern"],rg |
|
|
Sort results by modified,"rg --sort modified """"pattern""""",[rg --sort path "pattern"],rg |
|
|
Sort results by accessed,"rg --sort accessed """"pattern""""",[rg --sort modified "pattern"],rg |
|
|
Sort results by created,"rg --sort created """"pattern""""",[rg --sort path "pattern"],rg |
|
|
Show heading format,"rg --heading """"pattern""""",[rg "pattern"],rg |
|
|
Compact output format,"rg --no-heading """"pattern""""",[rg --heading "pattern"],rg |
|
|
Search with max filesize,"rg --max-filesize 1M """"pattern""""",[rg "pattern"],rg |
|
|
Show context separator,"rg -C 2 --context-separator """"---"""" """"pattern""""",[rg -C 3 "pattern"],rg |
|
|
Search with encoding,"rg --encoding utf-16 """"pattern""""",[rg "pattern"],rg |
|
|
List all files searched,"rg --files",[],rg |
|
|
Match only filename,"rg --files | rg """"pattern""""",[rg --files],rg |
|
|
Debug ripgrep,"rg --debug """"pattern""""",[rg "pattern"],rg |
|
|
Trace ripgrep execution,"rg --trace """"pattern""""",[rg --debug "pattern"],rg |
|
|
Show ripgrep version,"rg --version",[],rg |
|
|
Generate shell completions,"rg --generate complete-bash",[],rg |
|
|
Initialize a new git repository,git init,[],gi |
|
|
Check the status of the repository,git status,[git init],gi |
|
|
Add all files to staging,git add .,[git init;git status],gi |
|
|
Commit changes with a message,git commit -m "Initial commit",[git add .],gi |
|
|
Create a new branch,git branch feature-login,[git commit -m "Initial commit"],gi |
|
|
Switch to a branch,git checkout feature-login,[git branch feature-login],gi |
|
|
Create and switch to a new branch,git checkout -b feature-signup,[],gi |
|
|
View all branches,git branch -a,[git checkout -b feature-signup],gi |
|
|
Add remote origin,git remote add origin https: |
|
|
Push to remote repository,git push -u origin main,[git remote add origin https: |
|
|
Pull latest changes from remote,git pull origin main,[],gi |
|
|
Clone a repository,git clone https: |
|
|
View commit history,git log,[git commit -m "Add feature"],gi |
|
|
View commit history in one line,git log --oneline,[git log],gi |
|
|
Show difference in working directory,git diff,[git status],gi |
|
|
Show staged differences,git diff --cached,[git add .],gi |
|
|
Unstage a file,git reset HEAD file.txt,[git add file.txt],gi |
|
|
Discard changes in working directory,git checkout -- file.txt,[git diff],gi |
|
|
Amend the last commit,git commit --amend,[git commit -m "Fix bug"],gi |
|
|
Revert a commit,git revert abc123,[git log],gi |
|
|
Reset to a previous commit,git reset --hard abc123,[git log],gi |
|
|
Soft reset to previous commit,git reset --soft HEAD~1,[git commit -m "Wrong commit"],gi |
|
|
Stash current changes,git stash,[git status],gi |
|
|
Apply stashed changes,git stash apply,[git stash],gi |
|
|
List all stashes,git stash list,[git stash],gi |
|
|
Pop the latest stash,git stash pop,[git stash list],gi |
|
|
Create a tag,git tag v1.0.0,[git commit -m "Release ready"],gi |
|
|
Push tags to remote,git push --tags,[git tag v1.0.0],gi |
|
|
Delete a local branch,git branch -d feature-old,[git branch],gi |
|
|
Force delete a local branch,git branch -D feature-broken,[git branch -d feature-broken],gi |
|
|
Delete a remote branch,git push origin --delete feature-old,[git branch -d feature-old],gi |
|
|
Merge a branch,git merge feature-login,[git checkout main],gi |
|
|
Rebase current branch,git rebase main,[git checkout feature-login],gi |
|
|
Interactive rebase,git rebase -i HEAD~3,[git log],gi |
|
|
Cherry-pick a commit,git cherry-pick abc123,[git log],gi |
|
|
Show commit details,git show abc123,[git log --oneline],gi |
|
|
Fetch from remote,git fetch origin,[],gi |
|
|
View remote repositories,git remote -v,[],gi |
|
|
Rename a branch,git branch -m old-name new-name,[git branch],gi |
|
|
Update remote URL,git remote set-url origin https: |
|
|
Clean untracked files,git clean -fd,[git status],gi |
|
|
Show file history,git log -- file.txt,[],gi |
|
|
Blame a file,git blame file.txt,[],gi |
|
|
Create a new PR,gh pr create,[git push origin feature-login],gh |
|
|
List pull requests,gh pr list,[],gh |
|
|
View a specific PR,gh pr view 123,[gh pr list],gh |
|
|
Checkout a PR locally,gh pr checkout 123,[gh pr list],gh |
|
|
Merge a PR,gh pr merge 123,[gh pr view 123],gh |
|
|
Close a PR,gh pr close 123,[gh pr view 123],gh |
|
|
Reopen a PR,gh pr reopen 123,[gh pr close 123],gh |
|
|
Review a PR,gh pr review 123,[gh pr view 123],gh |
|
|
Check PR status,gh pr status,[],gh |
|
|
Create an issue,gh issue create,[],gh |
|
|
List issues,gh issue list,[],gh |
|
|
View an issue,gh issue view 456,[gh issue list],gh |
|
|
Close an issue,gh issue close 456,[gh issue view 456],gh |
|
|
Reopen an issue,gh issue reopen 456,[gh issue close 456],gh |
|
|
Create a repository,gh repo create my-project,[],gh |
|
|
Clone a repository,gh repo clone user/repo,[],gh |
|
|
View repository,gh repo view,[],gh |
|
|
Fork a repository,gh repo fork user/repo,[],gh |
|
|
List releases,gh release list,[],gh |
|
|
Create a release,gh release create v1.0.0,[],gh |
|
|
View a release,gh release view v1.0.0,[gh release list],gh |
|
|
Download release assets,gh release download v1.0.0,[gh release view v1.0.0],gh |
|
|
View GitHub workflow runs,gh run list,[],gh |
|
|
View specific workflow run,gh run view 789,[gh run list],gh |
|
|
Rerun a workflow,gh run rerun 789,[gh run view 789],gh |
|
|
View workflow logs,gh run view --log,[gh run list],gh |
|
|
Add a file to staging,git add file.txt,[git status],gi |
|
|
Add multiple files,git add file1.txt file2.txt,[git status],gi |
|
|
Add files by pattern,git add *.js,[git status],gi |
|
|
Commit with detailed message,git commit -m "Fix login bug" -m "Fixed authentication issue",[git add .],gi |
|
|
Push to a specific branch,git push origin feature-branch,[git commit -m "Add feature"],gi |
|
|
Pull with rebase,git pull --rebase,[],gi |
|
|
Force push,git push --force,[git rebase main],gi |
|
|
Force push with lease,git push --force-with-lease,[git rebase -i HEAD~3],gi |
|
|
Create an empty commit,git commit --allow-empty -m "Trigger CI",[],gi |
|
|
Show branch graph,git log --graph --oneline --all,[git log],gi |
|
|
Find commits by message,git log --grep="bug",[],gi |
|
|
Find commits by author,git log --author="John",[],gi |
|
|
Show commits in date range,git log --since="2 weeks ago",[],gi |
|
|
Configure user name,git config user.name "John Doe",[git init],gi |
|
|
Configure user email,git config user.email "john@example.com",[git config user.name "John Doe"],gi |
|
|
Set global configuration,git config --global user.name "John Doe",[],gi |
|
|
View all configurations,git config --list,[],gi |
|
|
Create a lightweight tag,git tag v0.1.0,[],gi |
|
|
Create an annotated tag,git tag -a v1.0.0 -m "Version 1.0.0",[],gi |
|
|
Delete a tag,git tag -d v0.1.0,[git tag],gi |
|
|
Delete a remote tag,git push origin --delete v0.1.0,[git tag -d v0.1.0],gi |
|
|
Show tag information,git show v1.0.0,[git tag],gi |
|
|
Checkout a specific tag,git checkout v1.0.0,[git tag],gi |
|
|
Compare two commits,git diff abc123 def456,[git log],gi |
|
|
Compare two branches,git diff main feature-branch,[git branch],gi |
|
|
Show files changed in commit,git diff-tree --no-commit-id --name-only -r abc123,[git log],gi |
|
|
List files in a commit,git show --name-only abc123,[git log],gi |
|
|
Restore a deleted file,git checkout HEAD -- file.txt,[git status],gi |
|
|
Restore file from specific commit,git checkout abc123 -- file.txt,[git log],gi |
|
|
Rename a file in git,git mv old-name.txt new-name.txt,[],gi |
|
|
Remove a file from git,git rm file.txt,[],gi |
|
|
Remove file from git but keep locally,git rm --cached file.txt,[],gi |
|
|
Update gitignore and remove cached,git rm -r --cached .,[echo "node_modules/" >> .gitignore],gi |
|
|
Squash last 3 commits,git rebase -i HEAD~3,[git log],gi |
|
|
Continue after rebase conflict,git rebase --continue,[git rebase main;git add .],gi |
|
|
Abort a rebase,git rebase --abort,[git rebase main],gi |
|
|
Continue after merge conflict,git merge --continue,[git merge feature;git add .],gi |
|
|
Abort a merge,git merge --abort,[git merge feature],gi |
|
|
Show merge conflicts,git diff --name-only --diff-filter=U,[git merge feature],gi |
|
|
Keep ours during merge,git checkout --ours file.txt,[git merge feature],gi |
|
|
Keep theirs during merge,git checkout --theirs file.txt,[git merge feature],gi |
|
|
Stash with a message,git stash save "Work in progress",[git status],gi |
|
|
Apply specific stash,git stash apply stash@{1},[git stash list],gi |
|
|
Drop a stash,git stash drop stash@{0},[git stash list],gi |
|
|
Clear all stashes,git stash clear,[git stash list],gi |
|
|
Show stash contents,git stash show -p stash@{0},[git stash list],gi |
|
|
Create a branch from stash,git stash branch feature-name,[git stash list],gi |
|
|
Archive a repository,git archive --format=zip HEAD > archive.zip,[],gi |
|
|
Count commits by author,git shortlog -sn,[],gi |
|
|
Find who deleted a file,git log --all --full-history -- file.txt,[],gi |
|
|
Search in commit history,git log -S "function_name",[],gi |
|
|
Show reflog,git reflog,[git reset --hard HEAD~1],gi |
|
|
Recover from reflog,git reset --hard HEAD@{1},[git reflog],gi |
|
|
Prune remote branches,git remote prune origin,[git fetch],gi |
|
|
Update all remote branches,git fetch --all,[],gi |
|
|
Show upstream branch,git branch -vv,[],gi |
|
|
Set upstream branch,git branch --set-upstream-to=origin/main,[git branch],gi |
|
|
Unset upstream branch,git branch --unset-upstream,[],gi |
|
|
Describe current commit,git describe,[],gi |
|
|
Show git version,git --version,[],gi |
|
|
Get help for a command,git help commit,[],gi |
|
|
Create a patch,git format-patch -1 abc123,[git log],gi |
|
|
Apply a patch,git apply patch-file.patch,[],gi |
|
|
Check patch before applying,git apply --check patch-file.patch,[],gi |
|
|
Create a bundle,git bundle create repo.bundle --all,[],gi |
|
|
Clone from bundle,git clone repo.bundle -b main,[],gi |
|
|
Bisect start,git bisect start,[],gi |
|
|
Mark commit as bad,git bisect bad,[git bisect start],gi |
|
|
Mark commit as good,git bisect good abc123,[git bisect bad],gi |
|
|
Bisect reset,git bisect reset,[git bisect good],gi |
|
|
Show file at specific commit,git show abc123:file.txt,[git log],gi |
|
|
List all files in repository,git ls-files,[],gi |
|
|
List ignored files,git ls-files --others --ignored --exclude-standard,[],gi |
|
|
Check if file is tracked,git ls-files --error-unmatch file.txt,[],gi |
|
|
Verify repository,git fsck,[],gi |
|
|
Optimize repository,git gc,[],gi |
|
|
Show repository statistics,git count-objects -v,[],gi |
|
|
Clone with specific depth,git clone --depth 1 https: |
|
|
Fetch specific branch,git fetch origin branch-name,[],gi |
|
|
Pull from specific remote,git pull upstream main,[git remote add upstream https: |
|
|
Track remote branch,git checkout --track origin/feature-branch,[git fetch],gi |
|
|
Create orphan branch,git checkout --orphan gh-pages,[],gi |
|
|
Remove all history,git checkout --orphan temp-branch,[],gi |
|
|
Add comment to PR,gh pr comment 123 --body "Looks good!",[gh pr view 123],gh |
|
|
Add assignee to issue,gh issue edit 456 --add-assignee user1,[gh issue view 456],gh |
|
|
Add label to issue,gh issue edit 456 --add-label bug,[gh issue view 456],gh |
|
|
Remove label from issue,gh issue edit 456 --remove-label bug,[gh issue view 456],gh |
|
|
Create issue from template,gh issue create --template bug_report.md,[],gh |
|
|
Create PR with reviewers,"gh pr create --reviewer user1,user2",[git push],gh |
|
|
Create PR to specific branch,gh pr create --base main --head feature-branch,[git push],gh |
|
|
Add PR to project,gh pr edit 123 --add-project "Project Name",[gh pr view 123],gh |
|
|
Mark PR as draft,gh pr ready 123 --undo,[gh pr view 123],gh |
|
|
Mark PR as ready,gh pr ready 123,[gh pr view 123],gh |
|
|
Approve a PR,gh pr review 123 --approve,[gh pr view 123],gh |
|
|
Request changes on PR,gh pr review 123 --request-changes,[gh pr view 123],gh |
|
|
Comment on PR review,gh pr review 123 --comment -b "Please fix tests",[gh pr view 123],gh |
|
|
View PR diff,gh pr diff 123,[gh pr view 123],gh |
|
|
List PR checks,gh pr checks 123,[gh pr view 123],gh |
|
|
View PR commits,gh pr view 123 --json commits,[gh pr view 123],gh |
|
|
Search repositories,gh repo list user --limit 20,[],gh |
|
|
Create private repository,gh repo create my-project --private,[],gh |
|
|
Create public repository,gh repo create my-project --public,[],gh |
|
|
Delete a repository,gh repo delete user/repo,[],gh |
|
|
Archive a repository,gh repo archive user/repo,[],gh |
|
|
Set repository visibility,gh repo edit --visibility private,[],gh |
|
|
Enable issues on repo,gh repo edit --enable-issues,[],gh |
|
|
Disable issues on repo,gh repo edit --disable-issues,[],gh |
|
|
Enable wiki on repo,gh repo edit --enable-wiki,[],gh |
|
|
View repository README,gh repo view --web,[],gh |
|
|
Clone with gh and cd into it,gh repo clone user/repo && cd repo,[],gh |
|
|
Search issues,gh issue list --search "bug",[],gh |
|
|
Filter issues by state,gh issue list --state closed,[gh issue list],gh |
|
|
Filter issues by label,gh issue list --label bug,[gh issue list],gh |
|
|
Filter issues by assignee,gh issue list --assignee @me,[gh issue list],gh |
|
|
Filter PRs by author,gh pr list --author user1,[gh pr list],gh |
|
|
Filter PRs by label,gh pr list --label "needs review",[gh pr list],gh |
|
|
Filter PRs by state,gh pr list --state merged,[gh pr list],gh |
|
|
View issue comments,gh issue view 456 --comments,[gh issue view 456],gh |
|
|
Add comment to issue,gh issue comment 456 --body "I can help with this",[gh issue view 456],gh |
|
|
Transfer issue,gh issue transfer 456 repo2,[gh issue view 456],gh |
|
|
Pin an issue,gh issue pin 456,[gh issue view 456],gh |
|
|
Unpin an issue,gh issue unpin 456,[gh issue pin 456],gh |
|
|
Lock an issue,gh issue lock 456,[gh issue view 456],gh |
|
|
Unlock an issue,gh issue unlock 456,[gh issue lock 456],gh |
|
|
View gist list,gh gist list,[],gh |
|
|
Create a gist,gh gist create file.txt,[],gh |
|
|
View a gist,gh gist view gist-id,[gh gist list],gh |
|
|
Edit a gist,gh gist edit gist-id,[gh gist view gist-id],gh |
|
|
Delete a gist,gh gist delete gist-id,[gh gist view gist-id],gh |
|
|
Clone a gist,gh gist clone gist-id,[gh gist list],gh |
|
|
List organization repositories,gh repo list org-name,[],gh |
|
|
View organization,gh org view org-name,[],gh |
|
|
List workflow files,gh workflow list,[],gh |
|
|
View specific workflow,gh workflow view workflow-name,[gh workflow list],gh |
|
|
Disable a workflow,gh workflow disable workflow-name,[gh workflow list],gh |
|
|
Enable a workflow,gh workflow enable workflow-name,[gh workflow disable workflow-name],gh |
|
|
Trigger a workflow,gh workflow run workflow-name,[gh workflow list],gh |
|
|
View secret list,gh secret list,[],gh |
|
|
Set a secret,gh secret set SECRET_NAME,[],gh |
|
|
Remove a secret,gh secret remove SECRET_NAME,[gh secret list],gh |
|
|
List GitHub API rate limit,gh api rate_limit,[],gh |
|
|
View authenticated user,gh api user,[],gh |
|
|
List user repos via API,gh api /user/repos,[],gh |
|
|
Create PR with body from file,gh pr create --body-file pr-description.md,[git push],gh |
|
|
Create issue with body from file,gh issue create --body-file issue-description.md,[],gh |
|
|
Auto-merge PR when checks pass,gh pr merge 123 --auto,[gh pr view 123],gh |
|
|
Squash merge a PR,gh pr merge 123 --squash,[gh pr view 123],gh |
|
|
Rebase merge a PR,gh pr merge 123 --rebase,[gh pr view 123],gh |
|
|
Delete branch after merge,gh pr merge 123 --delete-branch,[gh pr view 123],gh |
|
|
View repository issues and PRs,gh search issues --repo user/repo,[],gh |
|
|
Search code on GitHub,gh search code "function_name",[],gh |
|
|
Search commits on GitHub,gh search commits "fix bug",[],gh |
|
|
View GitHub notifications,gh notify list,[],gh |
|
|
List repository collaborators,gh api /repos/user/repo/collaborators,[],gh |
|
|
Invite collaborator,gh api /repos/user/repo/collaborators/username -X PUT,[],gh |
|
|
List repository branches,gh api /repos/user/repo/branches,[],gh |
|
|
Protect a branch,gh api /repos/user/repo/branches/main/protection -X PUT,[],gh |
|
|
View branch protection,gh api /repos/user/repo/branches/main/protection,[],gh |
|
|
List repository tags,gh api /repos/user/repo/tags,[],gh |
|
|
View repository languages,gh api /repos/user/repo/languages,[],gh |
|
|
List repository topics,gh api /repos/user/repo/topics,[],gh |
|
|
Star a repository,gh api /user/starred/user/repo -X PUT,[],gh |
|
|
Unstar a repository,gh api /user/starred/user/repo -X DELETE,[],gh |
|
|
List starred repositories,gh api /user/starred,[],gh |
|
|
Watch a repository,gh api /repos/user/repo/subscription -X PUT,[],gh |
|
|
Unwatch a repository,gh api /repos/user/repo/subscription -X DELETE,[],gh |
|
|
List repository watchers,gh api /repos/user/repo/subscribers,[],gh |
|
|
Compare two commits on GitHub,git diff origin/main..origin/feature,[git fetch],gi |
|
|
Show remote branches,git branch -r,[git fetch],gi |
|
|
Show all branches local and remote,git branch -a,[git branch],gi |
|
|
Check correct typo for status,git status,[git statsu],gi |
|
|
Check correct typo for commit,git commit -m "Fix bug",[git comit],gi |
|
|
Check correct typo for branch,git branch feature,[git brach],gi |
|
|
Check correct typo for checkout,git checkout main,[git chekout],gi |
|
|
Check correct typo for merge,git merge feature,[git marge],gi |
|
|
Check correct typo for rebase,git rebase main,[git rebas],gi |
|
|
Check correct typo for push,git push origin main,[git pus],gi |
|
|
Check correct typo for pull,git pull origin main,[git pul],gi |
|
|
Check correct typo for fetch,git fetch origin,[git fetc],gi |
|
|
Check correct typo for clone,git clone https: |
|
|
Check correct typo for remote,git remote -v,[git remot],gi |
|
|
Check correct typo for add,git add .,[git ad],gi |
|
|
Check correct typo for diff,git diff,[git dif],gi |
|
|
Check correct typo for log,git log,[git lo],gi |
|
|
Check correct typo for stash,git stash,[git stas],gi |
|
|
Check correct typo for tag,git tag v1.0.0,[git ta],gi |
|
|
Check correct typo for reset,git reset HEAD~1,[git rese],gi |
|
|
Check correct typo for revert,git revert abc123,[git rever],gi |
|
|
Correct gh pr typo,gh pr list,[gh p list],gh |
|
|
Correct gh issue typo,gh issue list,[gh issu list],gh |
|
|
Correct gh repo typo,gh repo view,[gh rep view],gh |
|
|
Correct gh release typo,gh release list,[gh relea list],gh |
|
|
Push after local commits,git push origin main,[git commit -m "Add feature";git commit -m "Fix bug"],gi |
|
|
Pull before starting work,git pull origin main,[git checkout main],gi |
|
|
Create branch after pull,git checkout -b feature-new,[git pull origin main],gi |
|
|
Push newly created branch,git push -u origin feature-new,[git checkout -b feature-new;git commit -m "Start feature"],gi |
|
|
Fetch before checking branches,git fetch origin,[git branch -a],gi |
|
|
Merge after resolving conflicts,git merge --continue,[git merge feature;git status;git add .],gi |
|
|
Commit after adding files,git commit -m "Add new files",[git add file1.txt file2.txt],gi |
|
|
Push after amending commit,git push --force-with-lease,[git commit --amend],gi |
|
|
Checkout main after merge,git checkout main,[git merge feature-branch],gi |
|
|
Delete branch after merge,git branch -d feature-branch,[git checkout main;git merge feature-branch],gi |
|
|
Tag after release commit,git tag -a v1.0.0 -m "Release v1.0.0",[git commit -m "Release: Version 1.0.0"],gi |
|
|
Push tags after creating,git push --tags,[git tag -a v1.0.0 -m "Release"],gi |
|
|
Stash before switching branch,git stash,[git checkout feature;git status],gi |
|
|
Pop stash after switching back,git stash pop,[git checkout main;git stash;git checkout feature;git checkout main],gi |
|
|
Rebase before merge,git rebase main,[git checkout feature;git fetch origin],gi |
|
|
Push after rebase,git push --force-with-lease,[git rebase main],gi |
|
|
Create PR after push,gh pr create,[git push -u origin feature-login],gh |
|
|
View PR after creation,gh pr view,[gh pr create],gh |
|
|
Merge PR after approval,gh pr merge --squash,[gh pr review 123 --approve],gh |
|
|
Delete remote branch after PR merge,git push origin --delete feature-branch,[gh pr merge 123],gi |
|
|
Create release after tag,gh release create v1.0.0,[git tag v1.0.0;git push --tags],gh |
|
|
Clone then cd into directory,cd repo,[git clone https: |
|
|
Initialize and add files,git add .,[git init],gi |
|
|
Add and commit in sequence,git commit -m "Initial commit",[git init;git add .],gi |
|
|
Pull before push,git pull --rebase origin main,[git commit -m "Update";git push origin main],gi |
|
|
Fetch and checkout remote branch,git checkout -b feature origin/feature,[git fetch origin],gi |
|
|
Create issue for bug,gh issue create --label bug,[],gh |
|
|
Assign issue to yourself,gh issue edit 456 --add-assignee @me,[gh issue create],gh |
|
|
Link PR to issue,gh pr create --body "Fixes #456",[gh issue view 456;git push],gh |
|
|
Close issue with PR merge,gh issue close 456,[gh pr merge 123],gh |
|
|
Check CI status before merge,gh pr checks 123,[gh pr view 123],gh |
|
|
View logs on CI failure,gh run view --log,[gh pr checks 123],gh |
|
|
Rerun failed workflow,gh run rerun,[gh run view --log],gh |
|
|
Update PR after changes,git push origin feature-branch,[gh pr create;git commit -m "Address review"],gi |
|
|
Review PR locally,gh pr checkout 123,[gh pr list],gh |
|
|
Test and approve PR,gh pr review 123 --approve,[gh pr checkout 123;git pull],gh |
|
|
Squash commits before PR,git rebase -i HEAD~5,[git log;gh pr create],gi |
|
|
Update commit message,git commit --amend -m "Better message",[git commit -m "Fix"],gi |
|
|
Force push amended commit,git push --force-with-lease,[git commit --amend -m "Better message"],gi |
|
|
Check which files changed,git status,[],gi |
|
|
View recent commits,git log -5,[],gi |
|
|
See what changed in last commit,git show HEAD,[git commit -m "Add feature"],gi |
|
|
Undo last commit keep changes,git reset --soft HEAD~1,[git commit -m "Wrong message"],gi |
|
|
Undo last commit discard changes,git reset --hard HEAD~1,[git commit -m "Bad commit"],gi |
|
|
Stage part of a file,git add -p file.txt,[git diff],gi |
|
|
Commit only staged changes,git commit -m "Partial update",[git add -p file.txt],gi |
|
|
Skip staging area,git commit -am "Quick fix",[git status],gi |
|
|
View only changed file names,git diff --name-only,[git status],gi |
|
|
View only staged file names,git diff --cached --name-only,[git add .],gi |
|
|
Compare with remote branch,git diff main origin/main,[git fetch],gi |
|
|
Show commits not in remote,git log origin/main..main,[git fetch],gi |
|
|
Show commits in remote not local,git log main..origin/main,[git fetch],gi |
|
|
View commit graph,git log --graph --oneline,[git log],gi |
|
|
Search for text in repository,git grep "search_term",[],gi |
|
|
Search in specific commit,git grep "search_term" abc123,[git log],gi |
|
|
List contributors,git shortlog -sn --all,[],gi |
|
|
View file at HEAD,git show HEAD:file.txt,[],gi |
|
|
Restore all files from HEAD,git checkout HEAD -- .,[git status],gi |
|
|
Create branch at specific commit,git branch new-branch abc123,[git log],gi |
|
|
View branches containing commit,git branch --contains abc123,[git log],gi |
|
|
View merged branches,git branch --merged,[git branch],gi |
|
|
View unmerged branches,git branch --no-merged,[git branch],gi |
|
|
Delete all merged branches,git branch --merged | grep -v main | xargs git branch -d,[git branch --merged],gi |
|
|
Push all branches,git push --all origin,[],gi |
|
|
Pull all branches,git fetch --all && git pull --all,[],gi |
|
|
Clone specific branch only,git clone -b main --single-branch https: |
|
|
Change commit author,git commit --amend --author="Name <email>",[git commit],gi |
|
|
Rewrite author in history,git rebase -i HEAD~3,[git log;git commit --amend --author="Name <email>"],gi |
|
|
Find merge base,git merge-base branch1 branch2,[git branch],gi |
|
|
Show changes introduced by merge,git log --merges,[git log],gi |
|
|
Show non-merge commits,git log --no-merges,[git log],gi |
|
|
Find commits by file content,git log -S"function_name" -- file.txt,[],gi |
|
|
Show commits that modified file,git log --follow -- file.txt,[],gi |
|
|
View file history with diffs,git log -p -- file.txt,[],gi |
|
|
Show who changed each line,"git blame -L 10,20 file.txt",[blame],gi |
|
|
Ignore blame revision,git blame --ignore-rev abc123 file.txt,[git blame file.txt],gi |
|
|
Create branch from tag,git checkout -b branch-name v1.0.0,[git tag],gi |
|
|
List tags matching pattern,git tag -l "v1.*",[git tag],gi |
|
|
Push specific tag,git push origin v1.0.0,[git tag v1.0.0],gi |
|
|
Fetch tags only,git fetch --tags,[],gi |
|
|
View changes in stash,git stash show -p,[git stash],gi |
|
|
Stash only unstaged changes,git stash --keep-index,[git add file.txt;git status],gi |
|
|
Stash untracked files too,git stash -u,[git status],gi |
|
|
Stash everything including ignored,git stash -a,[git status],gi |
|
|
Create patch series,git format-patch main..feature,[git log],gi |
|
|
Apply patch with sign-off,git am --signoff < patch-file.patch,[],gi |
|
|
Continue after patch conflict,git am --continue,[git am patch-file.patch;git add .],gi |
|
|
Skip current patch,git am --skip,[git am patch-file.patch],gi |
|
|
Abort patch application,git am --abort,[git am patch-file.patch],gi |
|
|
View submodules,git submodule status,[],gi |
|
|
Add a submodule,git submodule add https: |
|
|
Initialize submodules,git submodule init,[git clone https: |
|
|
Update submodules,git submodule update,[git submodule init],gi |
|
|
Update all submodules recursively,git submodule update --recursive --remote,[git submodule update],gi |
|
|
Clone with submodules,git clone --recurse-submodules https: |
|
|
Remove a submodule,git submodule deinit lib,[git submodule status],gi |
|
|
Show submodule diff,git diff --submodule,[git status],gi |
|
|
Foreach submodule execute,git submodule foreach git pull,[git submodule status],gi |
|
|
Create worktree,git worktree add ../repo-feature feature-branch,[],gi |
|
|
List worktrees,git worktree list,[git worktree add ../repo-feature feature-branch],gi |
|
|
Remove worktree,git worktree remove ../repo-feature,[git worktree list],gi |
|
|
Prune worktrees,git worktree prune,[git worktree remove ../repo-feature],gi |
|
|
Set default branch,git symbolic-ref HEAD refs/heads/main,[],gi |
|
|
View current HEAD,git symbolic-ref HEAD,[],gi |
|
|
List all refs,git show-ref,[],gi |
|
|
Update ref,git update-ref refs/heads/branch abc123,[],gi |
|
|
Delete ref,git update-ref -d refs/heads/branch,[git show-ref],gi |
|
|
Pack repository,git repack -ad,[],gi |
|
|
Verify pack files,git verify-pack -v .git/objects/pack/pack-*.idx,[],gi |
|
|
Prune unreachable objects,git prune,[],gi |
|
|
Aggressive garbage collection,git gc --aggressive,[git gc],gi |
|
|
Recover deleted branch,git checkout -b branch-name abc123,[git reflog],gi |
|
|
Find dangling commits,git fsck --lost-found,[],gi |
|
|
Expire reflog,git reflog expire --expire=30.days refs/heads/main,[git reflog],gi |
|
|
Delete reflog entry,git reflog delete HEAD@{1},[git reflog],gi |
|
|
Assume file unchanged,git update-index --assume-unchanged file.txt,[],gi |
|
|
Stop assuming unchanged,git update-index --no-assume-unchanged file.txt,[git update-index --assume-unchanged file.txt],gi |
|
|
Skip worktree for file,git update-index --skip-worktree config.txt,[],gi |
|
|
Stop skip worktree,git update-index --no-skip-worktree config.txt,[git update-index --skip-worktree config.txt],gi |
|
|
List assumed unchanged files,git ls-files -v | grep "^h",[git update-index --assume-unchanged file.txt],gi |
|
|
List skip worktree files,git ls-files -v | grep "^S",[git update-index --skip-worktree config.txt],gi |
|
|
Show merge commit parents,git show --pretty=raw abc123,[git log --merges],gi |
|
|
Create merge commit without merging,git merge --no-commit --no-ff feature,[],gi |
|
|
Merge with strategy,git merge -s recursive -X theirs feature,[git merge feature],gi |
|
|
Abort cherry-pick,git cherry-pick --abort,[git cherry-pick abc123],gi |
|
|
Continue cherry-pick,git cherry-pick --continue,[git cherry-pick abc123;git add .],gi |
|
|
Cherry-pick without commit,git cherry-pick -n abc123,[git log],gi |
|
|
Cherry-pick a range,git cherry-pick abc123..def456,[git log],gi |
|
|
View changes from a tag,git log v1.0.0..HEAD,[git tag],gi |
|
|
Create shallow clone,git clone --depth 1 https: |
|
|
Deepen shallow clone,git fetch --deepen=50,[git clone --depth 1 https: |
|
|
Unshallow repository,git fetch --unshallow,[git clone --depth 1 https: |
|
|
Clone without checking out,git clone --no-checkout https: |
|
|
Sparse checkout,git sparse-checkout init,[git clone --no-checkout https: |
|
|
Set sparse checkout paths,git sparse-checkout set src/app,[git sparse-checkout init],gi |
|
|
Disable sparse checkout,git sparse-checkout disable,[git sparse-checkout set src/app],gi |
|
|
Mirror clone a repository,git clone --mirror https: |
|
|
Push mirror,git push --mirror https: |
|
|
View commit signature,git show --show-signature abc123,[git log],gi |
|
|
Sign a commit,git commit -S -m "Signed commit",[git add .],gi |
|
|
Sign a tag,git tag -s v1.0.0 -m "Signed tag",[git commit],gi |
|
|
Verify tag signature,git tag -v v1.0.0,[git tag],gi |
|
|
Configure GPG signing,git config --global user.signingkey ABC123,[],gi |
|
|
Enable commit signing by default,git config --global commit.gpgSign true,[git config --global user.signingkey ABC123],gi |
|
|
Show commit with stats,git show --stat abc123,[git log],gi |
|
|
Show commit with word diff,git diff --word-diff,[git status],gi |
|
|
Show commit with color words,git diff --color-words,[git diff],gi |
|
|
Ignore whitespace in diff,git diff -w,[git status],gi |
|
|
Ignore whitespace changes,git diff -b,[git status],gi |
|
|
Show function context in diff,git diff -W,[git status],gi |
|
|
List remote tracking branches,git branch -vv,[git fetch],gi |
|
|
Set push default to current,git config --global push.default current,[],gi |
|
|
Set pull rebase by default,git config --global pull.rebase true,[],gi |
|
|
Configure default branch name,git config --global init.defaultBranch main,[],gi |
|
|
Configure line endings,git config --global core.autocrlf input,[],gi |
|
|
Configure editor,git config --global core.editor vim,[],gi |
|
|
Configure merge tool,git config --global merge.tool vimdiff,[],gi |
|
|
Configure diff tool,git config --global diff.tool vimdiff,[],gi |
|
|
Use diff tool,git difftool,[git config diff.tool vimdiff],gi |
|
|
Use merge tool,git mergetool,[git merge feature;git config merge.tool vimdiff],gi |
|
|
Show config origin,git config --show-origin --get user.name,[git config --list],gi |
|
|
Edit global config,git config --global --edit,[],gi |
|
|
Edit local config,git config --local --edit,[],gi |
|
|
Unset config value,git config --global --unset user.name,[git config --list],gi |
|
|
Remove config section,git config --global --remove-section user,[git config --list],gi |
|
|
List aliases,git config --get-regexp alias,[],gi |
|
|
Create git alias,git config --global alias.st status,[],gi |
|
|
Create complex alias,git config --global alias.lg "log --graph --oneline",[git config --global alias.st status],gi |
|
|
Create alias for branch,git config --global alias.br branch,[],gi |
|
|
Create alias for commit,git config --global alias.ci commit,[],gi |
|
|
Create alias for checkout,git config --global alias.co checkout,[],gi |
|
|
Use alias for status,git st,[git config --global alias.st status],gi |
|
|
Use alias for log,git lg,[git config --global alias.lg "log --graph --oneline"],gi |
|
|
Show last commit,git show,[git commit -m "Update"],gi |
|
|
Show HEAD parent,git show HEAD^,[git log],gi |
|
|
Show HEAD grandparent,git show HEAD^^,[git log],gi |
|
|
Show HEAD second parent,git show HEAD^2,[git log --merges],gi |
|
|
Show HEAD nth ancestor,git show HEAD~5,[git log],gi |
|
|
Show file from HEAD,git show HEAD:README.md,[],gi |
|
|
Show file from branch,git show main:README.md,[git branch],gi |
|
|
Compare file between branches,git diff main..feature -- file.txt,[git branch],gi |
|
|
Compare file between commits,git diff abc123..def456 -- file.txt,[git log],gi |
|
|
List files different between branches,git diff --name-status main..feature,[git branch],gi |
|
|
Show only added files,git diff --diff-filter=A --name-only main..feature,[git diff main..feature],gi |
|
|
Show only deleted files,git diff --diff-filter=D --name-only main..feature,[git diff main..feature],gi |
|
|
Show only modified files,git diff --diff-filter=M --name-only main..feature,[git diff main..feature],gi |
|
|
Show file mode changes,git diff --summary,[git status],gi |
|
|
Show binary files changed,git diff --numstat,[git status],gi |
|
|
Stage with intent to add,git add -N new-file.txt,[git status],gi |
|
|
Add interactively,git add -i,[git status],gi |
|
|
Stage all changes,git add -A,[git status],gi |
|
|
Stage modified and deleted,git add -u,[git status],gi |
|
|
Commit with verbose flag,git commit -v,[git add .],gi |
|
|
Commit and add all tracked,git commit -a -m "Update all",[git status],gi |
|
|
Commit with no edit,git commit --no-edit,[git merge feature],gi |
|
|
Commit with template,git commit -t template.txt,[git add .],gi |
|
|
Show commit template,git config --global commit.template ~/.gitmessage,[],gi |
|
|
Reuse commit message,git commit -C abc123,[git add .],gi |
|
|
Edit and reuse commit message,git commit -c abc123,[git add .],gi |
|
|
Fixup commit,git commit --fixup=abc123,[git add .],gi |
|
|
Squash commit,git commit --squash=abc123,[git add .],gi |
|
|
Autosquash rebase,git rebase -i --autosquash main,[git commit --fixup=abc123],gi |
|
|
Rebase onto another branch,git rebase --onto main dev feature,[git branch],gi |
|
|
Rebase preserve merges,git rebase -p main,[git checkout feature],gi |
|
|
Rebase interactive with exec,git rebase -i --exec "npm test" HEAD~3,[git log],gi |
|
|
Rebase skip,git rebase --skip,[git rebase main],gi |
|
|
Apply commits from another branch,git cherry-pick main~3..main,[git log],gi |
|
|
Cherry-pick without recording origin,git cherry-pick -x abc123,[git log],gi |
|
|
Cherry-pick and edit message,git cherry-pick --edit abc123,[git log],gi |
|
|
Cherry-pick mainline parent,git cherry-pick -m 1 abc123,[git log --merges],gi |
|
|
Show unpushed commits,git log @{u}..,git fetch],gi |
|
|
Show unpulled commits,git log ..@{u},[git fetch],gi |
|
|
View upstream tracking,git rev-parse --abbrev-ref @{upstream},[git branch],gi |
|
|
View remote tracking branch,git for-each-ref --format='%(upstream:short)' refs/heads,[],gi |
|
|
Fetch all remotes,git remote update,[],gi |
|
|
Fetch and prune,git fetch --prune,[],gi |
|
|
Prune remote tracking,git remote prune origin --dry-run,[git fetch],gi |
|
|
Show remote info,git remote show origin,[],gi |
|
|
Rename remote,git remote rename origin upstream,[git remote -v],gi |
|
|
Remove remote,git remote remove upstream,[git remote -v],gi |
|
|
Add multiple remotes,git remote add backup https: |
|
|
Push to multiple remotes,git push backup main,[git remote add backup https: |
|
|
Pull from upstream,git pull upstream main,[git remote add upstream https: |
|
|
Sync fork with upstream,git fetch upstream && git merge upstream/main,[git remote add upstream https: |
|
|
Create tracking branch,git branch --track feature origin/feature,[git fetch],gi |
|
|
Push and set upstream,git push -u origin feature,[git commit -m "New feature"],gi |
|
|
Push all tags and commits,git push --follow-tags,[git tag v1.0.0],gi |
|
|
Push with dry run,git push --dry-run,[git commit -m "Test"],gi |
|
|
Push specific refspec,git push origin HEAD:refs/heads/feature,[],gi |
|
|
Delete remote tag,git push origin :refs/tags/v1.0.0,[git tag -d v1.0.0],gi |
|
|
Fetch specific tag,git fetch origin tag v1.0.0,[],gi |
|
|
Fetch pull request,git fetch origin pull/123/head:pr-123,[],gi |
|
|
Push force safely,git push --force-with-lease origin main,[git rebase -i HEAD~3],gi |
|
|
Pull without commit,git pull --no-commit origin main,[],gi |
|
|
Pull with fast-forward only,git pull --ff-only,[],gi |
|
|
Pull with strategy,git pull -s recursive -X theirs,[],gi |
|
|
Clone bare repository,git clone --bare https: |
|
|
Clone with different name,git clone https: |
|
|
Clone with specific origin name,git clone -o upstream https: |
|
|
Clone specific tag,git clone --branch v1.0.0 https: |
|
|
Clone with filter,git clone --filter=blob:none https: |
|
|
Clone partial tree,git clone --filter=tree:0 https: |
|
|
Resume clone,git fetch,[git clone https: |
|
|
Show object type,git cat-file -t abc123,[git log],gi |
|
|
Show object size,git cat-file -s abc123,[git log],gi |
|
|
Show object content,git cat-file -p abc123,[git log],gi |
|
|
List tree contents,git ls-tree HEAD,[],gi |
|
|
List tree recursively,git ls-tree -r HEAD,[git ls-tree HEAD],gi |
|
|
Show tree with sizes,git ls-tree -l HEAD,[git ls-tree HEAD],gi |
|
|
Find commit with object,git rev-list --all --objects | grep abc123,[],gi |
|
|
Count all objects,git rev-list --all --objects | wc -l,[],gi |
|
|
Find large files in history,git rev-list --all --objects | git cat-file --batch-check='%(objectsize:disk) %(objectname) %(rest)' | sort -rn | head,[],gi |
|
|
Remove file from history,git filter-branch --tree-filter 'rm -f passwords.txt' HEAD,[git log -- passwords.txt],gi |
|
|
Remove directory from history,git filter-branch --tree-filter 'rm -rf node_modules' --prune-empty HEAD,[],gi |
|
|
Rewrite author in all commits,git filter-branch --env-filter 'export GIT_AUTHOR_NAME="New Name"' HEAD,[],gi |
|
|
Clean up filter-branch,git filter-branch --prune-empty --tag-name-filter cat -- --all,[],gi |
|
|
Use BFG for cleanup,git bfg --delete-files passwords.txt,[],gi |
|
|
Clone for BFG,git clone --mirror https: |
|
|
Lint commit messages,git log --oneline | head -10,[git commit -m "Update"],gi |
|
|
Find merge conflicts before merge,git merge --no-commit --no-ff feature && git diff,[],gi |
|
|
Abort merge and restore,git merge --abort && git reset --hard HEAD,[git merge feature],gi |
|
|
List files in conflict,git diff --name-only --diff-filter=U,[git merge feature],gi |
|
|
Accept all ours in conflict,git checkout --ours .,[git merge feature],gi |
|
|
Accept all theirs in conflict,git checkout --theirs .,[git merge feature],gi |
|
|
Mark conflict resolved,git add file.txt,[git merge feature;git checkout --ours file.txt],gi |
|
|
Show conflict diff3 style,git config --global merge.conflictStyle diff3,[],gi |
|
|
Show conflict markers,git checkout -m file.txt,[git merge feature],gi |
|
|
Rerere enable,git config --global rerere.enabled true,[],gi |
|
|
Show rerere status,git rerere status,[git merge feature],gi |
|
|
Apply rerere,git rerere,[git merge feature],gi |
|
|
Clear rerere cache,git rerere clear,[git rerere],gi |
|
|
Diff against stash,git diff stash@{0},[git stash],gi |
|
|
Create branch from stash commit,git checkout -b feature stash@{0}^1,[git stash],gi |
|
|
Show stash as patch,git stash show -p stash@{0},[git stash],gi |
|
|
Stash specific file,git stash push -m "Save file" file.txt,[git status],gi |
|
|
Stash with pathspec,git stash push -- "*.js",[git status],gi |
|
|
Partial stash pop,git stash apply stash@{0} && git stash drop stash@{0},[git stash],gi |
|
|
Restore from lost stash,git fsck --unreachable | grep commit | cut -d ' ' -f3 | xargs git log --oneline,[git stash clear],gi |
|
|
Show last stash,git stash show,[git stash],gi |
|
|
Rename stash,git stash drop stash@{0} && git stash store -m "New message" abc123,[git stash list],gi |
|
|
Show first commit,git log --reverse --oneline | head -1,[git log],gi |
|
|
Show root commits,git log --max-parents=0,[git log],gi |
|
|
Show merge commits only,git log --min-parents=2,[git log],gi |
|
|
Show non-fast-forward merges,git log --merges --first-parent,[git log],gi |
|
|
Show relative dates,git log --pretty=format:"%h %ar %s",[git log],gi |
|
|
Show commit date vs author date,git log --pretty=format:"%h %an %ad %cd",[git log],gi |
|
|
Filter by date range,git log --since="2024-01-01" --until="2024-12-31",[],gi |
|
|
Filter by time range,git log --since="1 month ago",[],gi |
|
|
Filter by author pattern,git log --author="John\|Jane",[],gi |
|
|
Filter commits by committer,git log --committer="Jenkins",[],gi |
|
|
Filter by commit message pattern,git log --grep="fix" --grep="bug" --all-match,[],gi |
|
|
Exclude commits by message,git log --grep="WIP" --invert-grep,[],gi |
|
|
Show commits touching lines,"git log -L 10,20:file.txt",[blame],gi |
|
|
Show commits for function,git log -L :functionName:file.js,[],gi |
|
|
Show decorated log,git log --decorate --oneline,[git log],gi |
|
|
Show log with references,git log --decorate=full --oneline,[git log],gi |
|
|
Show log with notes,git log --show-notes,[git log],gi |
|
|
Add note to commit,git notes add -m "Important fix" abc123,[git log],gi |
|
|
Edit commit note,git notes edit abc123,[git notes add -m "Note" abc123],gi |
|
|
Remove commit note,git notes remove abc123,[git notes add -m "Note" abc123],gi |
|
|
Show notes,git notes show abc123,[git notes add -m "Note" abc123],gi |
|
|
Push notes,git push origin refs/notes |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*.js",[git status],gi |
|
|
Add all in subdirectory,git add src/,[git status],gi |
|
|
Interactive stage hunks,git add -p,[git diff],gi |
|
|
Interactive stage mode,git add -i,[git status],gi |
|
|
Split hunk in patch mode,git add -p,[git diff],sp |
|
|
Edit hunk in patch mode,git add -p,[git diff],ed |
|
|
Commit amend no edit message,git commit --amend --no-edit,[git add forgotten.txt],gi |
|
|
Commit with date,git commit --date="2024-01-01" -m "Backdated commit",[git add .],gi |
|
|
Commit as different author,git commit --author="John Doe <john@example.com>" -m "Guest commit",[git add .],gi |
|
|
Commit allowing empty message,git commit --allow-empty-message -m "",[git add .],gi |
|
|
Commit with trailer,git commit -m "Fix bug" -m "Signed-off-by: John <john@example.com>",[git add .],gi |
|
|
Commit sign-off,git commit -s -m "Contribution",[git add .],gi |
|
|
Show statistics,git log --stat,[git log],gi |
|
|
Show shortstat,git log --shortstat,[git log],gi |
|
|
Show name status,git log --name-status,[git log],gi |
|
|
Show numstat,git log --numstat,[git log],gi |
|
|
Log with patch,git log -p,[git log],gi |
|
|
Log with unified context,git log -p -U10,[git log],gi |
|
|
Log one commit,git log -1,[git log],gi |
|
|
Log skip commits,git log --skip=5,[git log],gi |
|
|
Log max count,git log --max-count=10,[git log],gi |
|
|
Pretty print log,git log --pretty=oneline,[git log],gi |
|
|
Custom format log,"git log --format='%h - %an, %ar : %s'",[git log],gi |
|
|
Log with graph decorations,git log --graph --all --decorate,[git log],gi |
|
|
Show branch topology,git log --graph --simplify-by-decoration --all,[git log],gi |
|
|
Log current branch only,git log --first-parent,[git log],gi |
|
|
Show ancestry path,git log --ancestry-path abc123..def456,[git log],gi |
|
|
Checkout file from commit,git checkout abc123 -- file.txt,[git log],gi |
|
|
Checkout file from branch,git checkout main -- file.txt,[git branch],gi |
|
|
Checkout all files from commit,git checkout abc123 -- .,[git log],gi |
|
|
Create branch no checkout,git branch new-feature,[],gi |
|
|
Copy branch,git branch new-branch existing-branch,[git branch],gi |
|
|
Branch from commit,git branch feature-branch abc123,[git log],gi |
|
|
Move branch pointer,git branch -f main abc123,[git log],gi |
|
|
Show branch verbosely,git branch -v,[git branch],gi |
|
|
Show branch with upstream,git branch -vv,[git branch],gi |
|
|
Show last commit on branches,git branch -v,[git branch],gi |
|
|
Show commit on each branch,git show-branch,[git branch],gi |
|
|
Show common ancestor,git merge-base --all branch1 branch2,[git branch],gi |
|
|
Check if ancestor,git merge-base --is-ancestor abc123 def456 && echo yes || echo no,[git log],gi |
|
|
Find fork point,git merge-base --fork-point main,[git branch],gi |
|
|
Octopus merge,git merge branch1 branch2 branch3,[git branch],gi |
|
|
Merge without fast-forward,git merge --no-ff feature,[git checkout main],gi |
|
|
Merge with commit message,git merge -m "Merge feature" feature,[git checkout main],gi |
|
|
Merge only if fast-forward,git merge --ff-only feature,[git checkout main],gi |
|
|
Merge with signoff,git merge --signoff feature,[git checkout main],gi |
|
|
Squash merge without commit,git merge --squash --no-commit feature,[git checkout main],gi |
|
|
Merge with verbose,git merge -v feature,[git checkout main],gi |
|
|
Merge into current from,git merge feature,[git checkout main],gi |
|
|
Show merge in progress,git merge --continue,[git merge feature],gi |
|
|
List all configuration,git config -l,[],gi |
|
|
Get specific config,git config --get user.name,[],gi |
|
|
Get all matching configs,git config --get-all remote.origin.url,[],gi |
|
|
Show config with scope,git config --list --show-scope,[],gi |
|
|
Set local config,git config user.name "Local User",[],gi |
|
|
Set system config,git config --system user.name "System User",[],gi |
|
|
Check config type,git config --type=bool core.bare,[],gi |
|
|
Add to config,git config --add remote.origin.push refs/heads/*,[],gi |
|
|
Replace all config,git config --replace-all user.email new@example.com,[],gi |
|
|
Fetch with jobs,git fetch --jobs=4,[],gi |
|
|
Fetch with no tags,git fetch --no-tags,[],gi |
|
|
Fetch with atomic,git fetch --atomic,[],gi |
|
|
Push with verbose,git push -v,[git commit],gi |
|
|
Push with progress,git push --progress,[git commit],gi |
|
|
Push atomic,git push --atomic,[git commit],gi |
|
|
Push signed,git push --signed,[git commit],gi |
|
|
Push with push option,git push -o ci.skip,[git commit],gi |
|
|
Pull with jobs,git pull --jobs=4,[],gi |
|
|
Pull with verbose,git pull -v,[],gi |
|
|
Pull with autostash,git pull --autostash,[git status],gi |
|
|
Show submodule summary,git submodule summary,[git status],gi |
|
|
Sync submodule URLs,git submodule sync,[git submodule status],gi |
|
|
Absorb submodule gitdir,git submodule absorbgitdirs,[git submodule status],gi |
|
|
Initialize specific submodule,git submodule update --init path/to/submodule,[git clone repo],gi |
|
|
Shallow submodule update,git submodule update --depth=1,[git submodule init],gi |
|
|
Submodule foreach command,git submodule foreach 'git fetch origin',[git submodule status],gi |
|
|
Create private gist,gh gist create --private file.txt,[],gh |
|
|
Create public gist,gh gist create --public file.txt,[],gh |
|
|
Create gist with description,gh gist create -d "My script" script.sh,[],gh |
|
|
Create gist from stdin,echo "code" | gh gist create -,[],gh |
|
|
View gist in browser,gh gist view gist-id --web,[gh gist list],gh |
|
|
Edit gist file,gh gist edit gist-id -f file.txt,[gh gist view gist-id],gh |
|
|
Rename gist file,gh gist edit gist-id --rename old.txt=new.txt,[gh gist view gist-id],gh |
|
|
Add file to gist,gh gist edit gist-id --add new-file.txt,[gh gist view gist-id],gh |
|
|
Remove file from gist,gh gist edit gist-id --remove file.txt,[gh gist view gist-id],gh |
|
|
List user's gists,gh gist list --limit 50,[],gh |
|
|
List public gists,gh gist list --public,[gh gist list],gh |
|
|
List secret gists,gh gist list --secret,[gh gist list],gh |
|
|
Create repo with description,gh repo create --description "My project",[],gh |
|
|
Create repo with gitignore,gh repo create --gitignore Node,[],gh |
|
|
Create repo with license,gh repo create --license MIT,[],gh |
|
|
Create repo from template,gh repo create --template user/template,[],gh |
|
|
Create and clone repo,gh repo create --clone,[],gh |
|
|
Set repo default branch,gh repo edit --default-branch develop,[],gh |
|
|
Set repo description,gh repo edit --description "Updated description",[],gh |
|
|
Set repo homepage,gh repo edit --homepage "https: |
|
|
Add repo topic,gh repo edit --add-topic javascript,[],gh |
|
|
Remove repo topic,gh repo edit --remove-topic old-topic,[],gh |
|
|
Enable discussions,gh repo edit --enable-discussions,[],gh |
|
|
Disable wiki,gh repo edit --disable-wiki,[],gh |
|
|
Rename repository,gh repo rename new-name,[],gh |
|
|
Sync fork,gh repo sync owner/repo,[],gh |
|
|
View repo in browser,gh repo view --web,[],gh |
|
|
View repo JSON,"gh repo view --json name,description",[gh repo view],gh |
|
|
Create issue with title,gh issue create --title "Bug found",[],gh |
|
|
Create issue with assignee,gh issue create --assignee @me,[],gh |
|
|
Create issue with labels,"gh issue create --label bug,critical",[gh issue create],gh |
|
|
Create issue with milestone,gh issue create --milestone v1.0,[],gh |
|
|
Create issue with project,gh issue create --project "Roadmap",[],gh |
|
|
Create issue in browser,gh issue create --web,[],gh |
|
|
Reopen multiple issues,gh issue reopen 123 456 789,[gh issue list --state closed],gh |
|
|
Delete an issue,gh issue delete 456,[gh issue view 456],gh |
|
|
List my issues,gh issue list --assignee @me,[],gh |
|
|
List issues by milestone,gh issue list --milestone v2.0,[],gh |
|
|
List issues by mention,gh issue list --mention @username,[],gh |
|
|
List issues in JSON,"gh issue list --json number,title",[gh issue list],gh |
|
|
View issue in browser,gh issue view 456 --web,[gh issue list],gh |
|
|
View issue JSON,"gh issue view 456 --json title,body",[gh issue list],gh |
|
|
Develop issue,gh issue develop 456,[gh issue view 456],gh |
|
|
Develop and checkout,gh issue develop 456 --checkout,[gh issue view 456],gh |
|
|
Create draft PR,gh pr create --draft,[git push],gh |
|
|
Create PR with title,gh pr create --title "Add feature",[git push],gh |
|
|
Create PR with assignee,gh pr create --assignee user1,[git push],gh |
|
|
Create PR with label,gh pr create --label enhancement,[git push],gh |
|
|
Create PR with milestone,gh pr create --milestone v1.0,[git push],gh |
|
|
Create PR with project,gh pr create --project "Sprint 1",[git push],gh |
|
|
Create PR in browser,gh pr create --web,[git push],gh |
|
|
Create PR fill first,gh pr create --fill-first,[git push],gh |
|
|
Create PR fill verbose,gh pr create --fill-verbose,[git push],gh |
|
|
Edit PR title,gh pr edit 123 --title "Updated title",[gh pr view 123],gh |
|
|
Edit PR body,gh pr edit 123 --body "Updated description",[gh pr view 123],gh |
|
|
Edit PR base branch,gh pr edit 123 --base develop,[gh pr view 123],gh |
|
|
Add PR reviewer,gh pr edit 123 --add-reviewer user1,[gh pr view 123],gh |
|
|
Remove PR reviewer,gh pr edit 123 --remove-reviewer user1,[gh pr view 123],gh |
|
|
Add PR label,gh pr edit 123 --add-label bug,[gh pr view 123],gh |
|
|
Remove PR label,gh pr edit 123 --remove-label bug,[gh pr view 123],gh |
|
|
Add PR assignee,gh pr edit 123 --add-assignee @me,[gh pr view 123],gh |
|
|
Remove PR assignee,gh pr edit 123 --remove-assignee user1,[gh pr view 123],gh |
|
|
Add PR milestone,gh pr edit 123 --milestone v2.0,[gh pr view 123],gh |
|
|
Remove PR milestone,gh pr edit 123 --remove-milestone,[gh pr view 123],gh |
|
|
Add PR project,gh pr edit 123 --add-project "Sprint 2",[gh pr view 123],gh |
|
|
Remove PR project,gh pr edit 123 --remove-project "Sprint 1",[gh pr view 123],gh |
|
|
View PR in web,gh pr view 123 --web,[gh pr list],gh |
|
|
View PR JSON output,"gh pr view 123 --json title,state,url",[gh pr list],gh |
|
|
List my PRs,gh pr list --author @me,[],gh |
|
|
List PRs I review,gh pr list --search "review-requested:@me",[],gh |
|
|
List draft PRs,gh pr list --draft,[gh pr list],gh |
|
|
List PRs by base branch,gh pr list --base main,[gh pr list],gh |
|
|
List PRs by head branch,gh pr list --head feature-branch,[gh pr list],gh |
|
|
List PRs with JSON,"gh pr list --json number,title,state",[gh pr],gh |
|
|
Checkout PR branch,gh pr checkout 123,[gh pr list],gh |
|
|
View PR changes,gh pr diff 123,[gh pr view 123],gh |
|
|
View PR comments,gh pr view 123 --comments,[gh pr view 123],gh |
|
|
Merge PR with commit,gh pr merge 123 --merge,[gh pr view 123],gh |
|
|
Merge PR admin,gh pr merge 123 --admin,[gh pr view 123],gh |
|
|
Merge PR auto with squash,gh pr merge 123 --auto --squash,[gh pr view 123],gh |
|
|
Merge and delete branch,gh pr merge 123 --delete-branch --squash,[gh pr view 123],gh |
|
|
Reopen PR,gh pr reopen 123,[gh pr close 123],gh |
|
|
Lock PR conversation,gh pr lock 123,[gh pr merge 123],gh |
|
|
Unlock PR conversation,gh pr unlock 123,[gh pr lock 123],gh |
|
|
Enable PR auto-merge,gh pr merge 123 --auto --squash,[gh pr view 123],gh |
|
|
Disable PR auto-merge,gh pr merge 123 --disable-auto,[gh pr merge 123 --auto],gh |
|
|
Review PR with body,gh pr review 123 --approve --body "LGTM!",[gh pr view 123],gh |
|
|
Request PR changes with body,gh pr review 123 --request-changes --body "Please update tests",[gh pr view 123],gh |
|
|
Comment on PR,gh pr comment 123 --body "Great work!",[gh pr view 123],gh |
|
|
Edit PR comment,gh pr comment 123 --edit-last,[gh pr comment 123 --body "Comment"],gh |
|
|
Watch run in terminal,gh run watch,[gh run list],gh |
|
|
View run logs,gh run view 789 --log,[gh run list],gh |
|
|
View specific job logs,gh run view --job 123 --log,[gh run list],gh |
|
|
Download run artifacts,gh run download 789,[gh run view 789],gh |
|
|
Download specific artifact,gh run download 789 --name artifact-name,[gh run view 789],gh |
|
|
List workflow runs for branch,gh run list --branch main,[],gh |
|
|
List workflow runs by status,gh run list --status failure,[gh run list],gh |
|
|
List workflow runs by workflow,gh run list --workflow ci.yml,[],gh |
|
|
List workflow runs with JSON,"gh run list --json conclusion,status,name",[gh run list],gh |
|
|
Cancel workflow run,gh run cancel 789,[gh run view 789],gh |
|
|
Rerun failed jobs,gh run rerun 789 --failed,[gh run view 789],gh |
|
|
View workflow run in browser,gh run view 789 --web,[gh run list],gh |
|
|
View workflow in browser,gh workflow view ci.yml --web,[gh workflow list],gh |
|
|
Trigger workflow with inputs,gh workflow run deploy.yml --field environment=production,[gh workflow list],gh |
|
|
Trigger workflow on branch,gh workflow run ci.yml --ref develop,[gh workflow list],gh |
|
|
Create release with notes,gh release create v1.0.0 --notes "Release notes",[git tag v1.0.0],gh |
|
|
Create release from tag,gh release create v1.0.0 --title "Version 1.0.0",[git tag v1.0.0;git push --tags],gh |
|
|
Create release with assets,gh release create v1.0.0 --attach dist |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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