Skip to content

Instantly share code, notes, and snippets.

View diakogiannis's full-sized avatar
🎯
Focusing

Alexius DIAKOGIANNIS diakogiannis

🎯
Focusing
View GitHub Profile
@patik
patik / how-to-squash-commits-in-git.md
Last active October 17, 2023 02:19
How to squash commits in git

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

@skarllot
skarllot / backup_mysqldb.sh
Last active November 30, 2022 08:50
Bash script to backup all mysql databases thru mysqldump
#!/bin/bash
# Destiny folder where backups are stored
DEST=/tmp/bacula/server01
CURRDATE=$(date +"%F")
# Hostname where MySQL is running
HOSTNAME="srv-mysql"
# User name to make backup
USER="root"