Skip to content

Latest commit

 

History

History
100 lines (70 loc) · 2.77 KB

git.md

File metadata and controls

100 lines (70 loc) · 2.77 KB

Git configuration and commands

The tracked git/gitconfig contains portable public behavior only. It does not contain names, email addresses, signing keys, credentials, or work-specific settings.

The installer adds this file near the beginning of the local global Git configuration. Later local rules can therefore override public defaults.

Defaults

New repositories use main as their initial branch.

Apple Git is used by default. A separate Homebrew Git installation is excluded because the current configuration and commands do not require it.

Readable log

git lg shows a compact colored graph for the current branch, including decorations, commit subject, date, and author.

Normal Git arguments remain available:

git lg --all
git lg -20
git lg develop
git lg --first-parent

Safe synchronization

git sync

The tracked bin/git-sync executable is discovered by Git as an external command. Normal synchronization:

  • Fetches every remote and tag.
  • Prunes stale remote-tracking branches.
  • Fast-forwards local branches that are strictly behind their upstream.
  • Leaves ahead, diverged, missing-upstream, stale, or separately checked-out branches unchanged.
  • Prints an explanation and suggested command for anything needing attention.

It never merges divergent histories, rebases, resets, performs non-fast-forward updates, or deletes local branches and tags during normal synchronization.

Show command help with:

git sync -h

Git intercepts git sync --help as a manual-page request, so -h is the supported help form when invoking the command through Git.

Cleanup preview

Preview cleanup candidates after normal synchronization:

git sync --cleanup --dry-run

--dry-run applies only to deletion. The fetch and safe fast-forward phase still runs.

Review and confirm candidates individually:

git sync --cleanup

A local branch is offered for deletion only when:

  • Its upstream is gone.
  • It is not the current branch or checked out in another worktree.
  • Its tip is merged into that remote's default branch.
  • Its tip and merged state are rechecked immediately before deletion.

Tags absent from every configured remote are ambiguous and always require individual confirmation. Cleanup never deletes anything without an explicit y response.

Identity boundary

Git identity configuration remains local. A fresh machine must configure its own identity or conditional identity files separately. Personal and work identity files must not be committed to this public repository. Commit authorship metadata may still be public.

Cloning over HTTPS requires no SSH key for this public repository. After SSH authentication is configured, change the remote if desired:

git remote set-url origin git@github.com:mglolmos/dotfiles.git