.gitconfig

This is my .gitconfig that I have mostly stolen shamelessly from people on the internet that are much more intimately familiar with git than I am. Without further ado:

[user]
    name = <Your Name Here>
    email = <Your Email Here>

[core]
    autocrlf = input # Convert CRLF to LF on commit, but don't convert LF to CRLF on checkout.

[column]
    ui = auto # Automatically determine the best column layout for Git output.

[branch]
    sort = -committerdate

[tag]
    sort = version:refname # Sort tags by version number and then by reference name.

[init]
    defaultBranch = main

[diff]
    algorithm = histogram # Histogram diff algorithm is good for detecting moved code.
    colorMoved = plain # Color highlight moved code blocks.
    mnemonicPrefix = true # Shows the type of change (e.g., a/b) in diffs
    renames = true # Git detects and shows renamed files.

[push]
    default = simple # Configures 'git push' to push the current branch to its upstream branch.
    autoSetupRemote = true # Automatically sets up remote tracking branches when pushing a new branch.
    followTags = true # Pushes tags along with branches.

[fetch]
    prune = true # Removes remote-tracking branches that no longer exist on the remote.
    pruneTags = true # Removes remote tags that no longer exist on the remote.
    all = true # fetches all remote branches and tags.