journalctl uses a lot of space on my disk

The aswer is you can check the used size and you can shrink the used space.

journalctl --disk-usage
journalctl --vacuum-size=1G

Other Options are

--vacuum-size=BYTES   Reduce disk usage below specified size
--vacuum-files=INT    Leave only the specified number of journal files
--vacuum-time=TIME    Remove journal files older than specified time

Create an Empty Branch in Git

To create a new empty branch in Git, we can use the --orphan command line option

git checkout --orphan 

The command above creates the new empty branch and switches into it.
Once the empty branch s created, we can can delete files from the working directory, so they are not committed in to the new branch

git rm -rf .

Now you are in the empty branch without any inherited files or commits.
If you want to push your empty branch to a remote repository, do the following

git commit --alow-empty -m "Init"
git push origin 

Note, that if you try to merge another branch into the empty one, you will receive the error: fatal: refusing to merge unrelated histories

Use the --allow-unrelated-history option to force the merge into the empty branch.

git merge --allow-unrelated-history 

Archive for January, 2024

Archives by Month: