Change branch witouth commit
git stash save -u "message"
git stash list
git checkout other-branch
to unstash
git apply stash@{6}
or git stash pop
Reset branch with origin
git fetch origin
git reset --hard origin/master
Git log with tree
git log --graph --pretty='\''%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'\'' --all
Delete branch merged in master
git fetch
git branch --merged master | grep -v "^\* master" | xargs -n 1 -r git branch -d
Delete branches taht no longer exist on the remote
git fetch
git branch -vv | grep ': gone]' | grep -v '\*' | awk '{ print $1; }' | xargs -r git branch -d
find . --maxdepth 2 -iname log.log -type f -exec grep -m 1 "Trace" {} +
cat file | grep word
cat file | grep -v word
find . | grep -E "(/__pycache__$|\.pyc$|\.pyo$)" | xargs rm -rf
tar -cvzf code.tar.gz code/*
tar -cvzf code.tar.gz code/. # Hidden files
tar -xf cide.tar.gz
- Stop the container(s) using the following command:
docker-compose down
- Delete all containers using the following command:
docker rm -f $(docker ps -a -q)
- Delete all volumes using the following command:
docker volume rm $(docker volume ls -q)
- Restart the containers using the following command:
docker-compose up -d