daily used commands

git

git init
git add .
git commit -m " "
git remote add origin <url>
git push
git checkout <branch>
git checkout -b <branch>
git branch
git status
git stash
git diff 
git clone <url>
git merge <branch>

### 
git pull
git submodule foreach git checkout master
git submodule foreach git pull origin master

#####
git submodule add <url>

docker-compose

docker-compose build && docker-compose down && docker-compose up -d
docker-compose ps  # shows status and other info of all containers written in docker-compose
docker-compose logs -f <container_name> # run on background
docker-compose logs <container_name>
docker-compose down --remove-orphans

docker rmi <id> <id> <id> 
docker image list
docker stop <id>
docker image prune -f
docker ps # to get id for each container

docker volume rm $(docker volume ls -qf dangling=true) #clean disk space

react

npx create-react-app <name>
npm start

npm create vite@latest
npm run dev

npm i react-router-dom react-redux @reduxjs/toolkit

node

npm init -y
npm run dev

npm i express cors body-parser
npm i -D nodemon

python

python3 -m venv <name>
activate --> ctrl+r (search) --> source venv/bin/activate (or)
-->source ~/venv/bin/activate # venv is created in home 
pip install -r requirement.txt
pip freeze
pip freeze | grep <name>
deactivate
python3 <file>

common terminal command

code .
cd <directory path>
cd ..
cd ~ # directly move to root folder
mkdir <folder-name>
# torch <file-name>
ls
cat inf.py # to see code present inside given file
sudo chmod -R 777 <folder-name> # to get permission to add/delete file
./nvtop-x86_64.AppImage  # to check gpu usage
htop  # to check cpu usage
./RedisInsight-v2-linux-x86_64.AppImage # to start redis
ctrl+j / ctrl+~terminal
ctrl+bsidebar directory of project
crtl+dselect all same instance inside the file
alt+zto wrap the code to new line