Step 1: Installing Git on Linux

Assuming you use Ubuntu, the following command will install Git:

sudo apt-get install git
(after you have entered your superuser password)

Then check the version:

git --version

The version should be at least 2.X in order for git add . to propogate changes in all subdirectories - see this link.

Besides being used for version control, Git allows one to easily install add-ons to Vim and tmux.

Step 2: Git settings

The following script modifies the ~/.gitconfig file to include:

While git log --oneline is great, it may be useful to have more information (time of commits, commit authors, etc). The following three options are worth trying out. To activate a Git alias, enter one of the following commands in a terminal:

git config --global alias.lgb "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%n' --abbrev-commit --date=relative --branches"
git config --global alias.lola "log --graph --all --decorate --oneline --abbrev-commit"
git config --global alias.lgo "log --all --pretty='%C(yellow)%h%Creset %C(auto)%d%Creset  %s %C(cyan)%ci%Creset' --date-order --max-count=10"
git config --global core.editor "vim"

Step 3: Installing Git Latexdiff

#create and move to ~/build/vim dir
currentdir=$(pwd)
mkdir -p ~/build; cd ~/build
mkdir -p ~/build/latexdiff; cd ~/build/latexdiff
git clone https://gitlab.com/git-latexdiff/git-latexdiff.git
cd ./git-latexdiff
sudo make install

Enter your superuser password, let Git latexdiff install, and then move back to the previous directory:

cd "$currentdir"

See this post for more about using Git and latexdiff