-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
61 lines (45 loc) · 1.43 KB
/
.gitconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
[user]
name = Your Name
email = [email protected]
[core]
editor = nano # Change to your preferred editor
autocrlf = input # Handles line endings in cross-platform environments
[alias]
# Shortcuts for common Git commands
co = checkout
br = branch
ci = commit
st = status
hist = log --oneline --graph --decorate --all
type = cat-file -t
dump = cat-file -p
# View the history of changes to a file
lg = log --oneline --decorate --graph --all
# View detailed log with diffs
ll = log --stat --oneline
# Show changes in the working directory (including untracked files)
s = status -s
# Add all changes (including untracked files)
aa = add --all
# Commit with message
cm = commit -m
# Amend the last commit
amend = commit --amend --no-edit
# Fetch from all remotes
fa = fetch --all
# Prune and clean up branches
prune = fetch --prune
cleanup = "!git remote prune origin && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
# Push the current branch to origin
po = push origin HEAD
# Rebase interactively
ri = rebase -i
# Stash changes
stsh = stash
stshp = stash pop
# Show recent commits
recent = log --pretty=format:\"%h %s\" --date=short --graph
[push]
default = simple # Simple push behavior (only push the current branch)
[diff]
tool = meld # Set your preferred diff tool