/the-things-i-dont-know

New things come everyday, my brain could run out of space. This repository is working like my hard disk to store the things which I learn everyday.

The Things I Don't Know

Table of Contents

Git

fatal: transport 'file' not allowed

Issue link: https://vielmetti.typepad.com/logbook/2022/10/git-security-fixes-lead-to-fatal-transport-file-not-allowed-error-in-ci-systems-cve-2022-39253.html Solution

git config --global protocol.file.allow always 

How to find the current tag?

  git describe --tags

How to remove a directory from Git and local

git rm -r one-of-the-directories // This deletes from filesystem
git commit . -m "Remove duplicated directory"
git push origin <your-git-branch> (typically 'master', but not always)

How to set username and email in git

git config user.name "MyName"
git config user.email "MyEmail" 

Compare two git branches

# Using double dots
# Show all the commits that branch2 has that are not in branch1

git diff branch1..branch2

# Using triple dots
# Compare the Head of branch 2 with the common ancestor of two branches 
git diff banch1...branch2

Create new tag from another tag

git tag -a new_tag old_tag -m 'create new tag from old tag'

Linux Commands

How to count occurrences of a word in a file?

  grep -ow 'word' filename | wc -l

Docker

Procceed and delete all stopped containers

docker container prune -f 

Redis

Get information about redis server

INFO server