Opengist

Explore

  • All gists
  • Topics
  • Users
Give feedback on the new UI Powered by Opengist ⋅ 13ms

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Login
p

productivity

Recently created Least recently created Recently updated Least recently updated

timmy / Git 設定最佳化指南

Last active 5 hours ago customization git-alias git-config productivity version-control

優化你的 Git 配置:添加快捷鍵,提升可讀性,確保個人資訊不入版控。

1 0 0 3
1 # 引入本地個人設定,避免將個資存入版本控制
2 [include]
3 path = ~/.gitconfig.local
4
5 # Git log 的預設顯示設定
6 [log]
7 decorate = short # 顯示簡短的 ref 名稱(例如 HEAD -> main)
8 abbrevCommit = true # 顯示簡短的 commit hash(例如 1a2b3c4)
9
10 # 常用 Git 指令的簡寫別名