I use this simple shortcut in my local development machine and some colleagues have asked me about it. It’s pretty simple but has saved me tons of time.

We are just adding, committing, and pushing to the remote repository with one command. The only thing that you have to do is update your ~/.bashrc or ~/.profile with the following code.

function g () { 
git add -A && git commit -m "$1" && git push

You can then source your profile file like:

source ~/.bashrc

You can now simply:

g “I am awsome and I do not know what exactly I am committing to the branch”

PLEASE do use it carefully as commits ALL files: tracked and untracked.



INI files are a popular choice for creating configurations for programs. Each file contains various sections and each section contains the settings.

For example

ServerAliveInterval = 45
Compression = yes
CompressionLevel = 9
ForwardX11 = yes
User = hg
Port = 50022
ForwardX11 = no

Sometimes INI configuration files become really large and there is a need to sort them so that you can better compare different versions. The following script can sort and save the sorted version of an existing configuration file in Python 3 version.