@sebastienrousseau/dotfiles 0.2.460 → 0.2.462
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +115 -91
- package/dist/Makefile +4 -3
- package/dist/bin/backup.d.ts.map +1 -1
- package/dist/bin/backup.js +3 -2
- package/dist/bin/backup.js.map +1 -1
- package/dist/bin/constants.d.ts +2 -2
- package/dist/bin/constants.d.ts.map +1 -1
- package/dist/bin/constants.js +1 -1
- package/dist/bin/constants.js.map +1 -1
- package/dist/bin/copy.d.ts.map +1 -1
- package/dist/bin/copy.js +2 -1
- package/dist/bin/copy.js.map +1 -1
- package/dist/bin/dotfiles.d.ts.map +1 -1
- package/dist/bin/dotfiles.js +1 -1
- package/dist/bin/dotfiles.js.map +1 -1
- package/dist/bin/download.d.ts +2 -2
- package/dist/bin/download.d.ts.map +1 -1
- package/dist/bin/download.js +2 -1
- package/dist/bin/download.js.map +1 -1
- package/dist/bin/index.js +1 -1
- package/dist/bin/index.js.map +1 -1
- package/dist/bin/transfer.d.ts.map +1 -1
- package/dist/bin/transfer.js +1 -1
- package/dist/bin/transfer.js.map +1 -1
- package/dist/bin/unpack.d.ts.map +1 -1
- package/dist/bin/unpack.js +1 -1
- package/dist/bin/unpack.js.map +1 -1
- package/dist/filesizes.txt +332 -288
- package/dist/lib/aliases/archives/archives.aliases.sh +42 -0
- package/dist/lib/aliases/clear/clear.aliases.sh +23 -0
- package/dist/lib/aliases/configuration/configuration.aliases.sh +12 -0
- package/dist/lib/aliases/default/default.aliases.sh +37 -173
- package/dist/lib/aliases/dig/dig.aliases.sh +19 -0
- package/dist/lib/aliases/diskusage/diskusage.aliases.sh +16 -0
- package/dist/lib/aliases/editor/editor.aliases.sh +19 -0
- package/dist/lib/aliases/find/find.aliases.sh +24 -0
- package/dist/lib/aliases/gcloud/gcloud.aliases.sh +120 -116
- package/dist/lib/aliases/git/git.aliases.sh +341 -335
- package/dist/lib/aliases/gnu/gnucoreutls-aliases.sh +111 -0
- package/dist/lib/aliases/heroku/heroku.aliases.sh +713 -710
- package/dist/lib/aliases/interactive/interactive.aliases.sh +14 -0
- package/dist/lib/aliases/jekyll/jekyll.aliases.sh +49 -46
- package/dist/lib/aliases/list/list.aliases.sh +33 -0
- package/dist/lib/aliases/make/make.aliases.sh +15 -0
- package/dist/lib/aliases/mkdir/mkdir.aliases.sh +13 -0
- package/dist/lib/aliases/navigation/navigation.aliases.sh +23 -0
- package/dist/lib/aliases/npm/npm.aliases.sh +24 -0
- package/dist/lib/aliases/permission/permission.aliases.sh +28 -0
- package/dist/lib/aliases/pnpm/pnpm.aliases.sh +38 -38
- package/dist/lib/aliases/ps/ps.aliases.sh +12 -0
- package/dist/lib/aliases/rsync/rsync.aliases.sh +9 -0
- package/dist/lib/aliases/rust/rust.aliases.sh +50 -0
- package/dist/lib/aliases/subversion/subversion.aliases.sh +42 -119
- package/dist/lib/aliases/sudo/sudo.aliases.sh +11 -0
- package/dist/lib/aliases/tmux/tmux.aliases.sh +13 -10
- package/dist/lib/aliases/update/update.aliases.sh +38 -0
- package/dist/lib/aliases/uuid/uuid.aliases.sh +10 -0
- package/dist/lib/aliases/wget/wget.aliases.sh +13 -0
- package/dist/lib/aliases.sh +7 -3
- package/dist/lib/configurations/bash/bashrc +4 -3
- package/dist/lib/configurations/curl/curlrc +3 -2
- package/dist/lib/configurations/default/color.sh +3 -2
- package/dist/lib/configurations/default/constants.sh +10 -9
- package/dist/lib/configurations/default/editor.sh +3 -2
- package/dist/lib/configurations/default/prompt.sh +3 -2
- package/dist/lib/configurations/input/inputrc +3 -2
- package/dist/lib/configurations/nano/nanorc +3 -2
- package/dist/lib/configurations/profile/profile +3 -2
- package/dist/lib/configurations/tmux/default +3 -2
- package/dist/lib/configurations/tmux/display +3 -2
- package/dist/lib/configurations/tmux/linux +3 -2
- package/dist/lib/configurations/tmux/navigation +3 -2
- package/dist/lib/configurations/tmux/panes +3 -2
- package/dist/lib/configurations/tmux/theme +4 -3
- package/dist/lib/configurations/tmux/tmux +3 -2
- package/dist/lib/configurations/tmux/vi +3 -2
- package/dist/lib/configurations/vim/vimrc +1 -1
- package/dist/lib/configurations/wget/wgetrc +3 -2
- package/dist/lib/configurations/zsh/zshrc +6 -5
- package/dist/lib/configurations.sh +3 -2
- package/dist/lib/functions/cdls.sh +4 -10
- package/dist/lib/functions/changediskpwd.tmp +5 -3
- package/dist/lib/functions/code.tmp +5 -3
- package/dist/lib/functions/countdown.tmp +3 -2
- package/dist/lib/functions/curlheader.sh +6 -5
- package/dist/lib/functions/curltime.sh +8 -6
- package/dist/lib/functions/encode64.sh +3 -2
- package/dist/lib/functions/environment.sh +3 -2
- package/dist/lib/functions/extract.sh +3 -2
- package/dist/lib/functions/genpwd.sh +3 -2
- package/dist/lib/functions/goto.sh +3 -2
- package/dist/lib/functions/hidehiddenfiles.sh +3 -2
- package/dist/lib/functions/history-all.tmp +3 -2
- package/dist/lib/functions/hostinfo.sh +3 -2
- package/dist/lib/functions/hstats.sh +3 -2
- package/dist/lib/functions/httpdebug.sh +3 -2
- package/dist/lib/functions/keygen.sh +3 -2
- package/dist/lib/functions/last.sh +3 -2
- package/dist/lib/functions/logout.sh +3 -2
- package/dist/lib/functions/lowercase.sh +3 -2
- package/dist/lib/functions/macos.sh +3 -2
- package/dist/lib/functions/matrix.sh +3 -2
- package/dist/lib/functions/{mcd.sh → mcd.tmp} +3 -2
- package/dist/lib/functions/mount_read_only.sh +3 -2
- package/dist/lib/functions/myproc.sh +3 -2
- package/dist/lib/functions/prependpath.sh +3 -2
- package/dist/lib/functions/print.tmp +3 -2
- package/dist/lib/functions/ql.sh +3 -2
- package/dist/lib/functions/rd.sh +3 -2
- package/dist/lib/functions/remove_disk.sh +3 -2
- package/dist/lib/functions/ren.sh +3 -2
- package/dist/lib/functions/rm.tmp +3 -2
- package/dist/lib/functions/rps.tmp +3 -2
- package/dist/lib/functions/showhiddenfiles.sh +3 -2
- package/dist/lib/functions/size.sh +3 -2
- package/dist/lib/functions/stopwatch.sh +3 -2
- package/dist/lib/functions/trash.tmp +3 -2
- package/dist/lib/functions/tree.tmp +3 -2
- package/dist/lib/functions/uppercase.sh +3 -2
- package/dist/lib/functions/uuidgen.tmp +2 -1
- package/dist/lib/functions/view-source.sh +3 -2
- package/dist/lib/functions/vscode.sh +3 -2
- package/dist/lib/functions/whoisport.sh +3 -2
- package/dist/lib/functions/zipf.sh +3 -2
- package/dist/lib/functions.sh +3 -2
- package/dist/lib/history.sh +3 -2
- package/dist/lib/paths/ant/ant.paths.sh +3 -2
- package/dist/lib/paths/default/default.paths.sh +3 -2
- package/dist/lib/paths/homebrew/homebrew.paths.sh +3 -2
- package/dist/lib/paths/java/java.paths.sh +4 -3
- package/dist/lib/paths/maven/maven.paths.sh +3 -2
- package/dist/lib/paths/node/node.paths.sh +3 -2
- package/dist/lib/paths/nvm/nvm.paths.sh +3 -2
- package/dist/lib/paths/pnpm/pnpm.paths.sh +3 -2
- package/dist/lib/paths/python/python.paths.sh +3 -2
- package/dist/lib/paths/ruby/ruby.paths.sh +3 -2
- package/dist/lib/paths/tmux/tmux.paths.sh +3 -2
- package/dist/lib/paths.sh +3 -2
- package/dist/scripts/backup.sh +8 -3
- package/dist/scripts/banner.sh +3 -2
- package/dist/scripts/build.sh +3 -2
- package/dist/scripts/clean.sh +3 -2
- package/dist/scripts/compile.sh +3 -2
- package/dist/scripts/copy.sh +3 -2
- package/dist/scripts/dotfiles.sh +3 -2
- package/dist/scripts/download.sh +3 -2
- package/dist/scripts/help.sh +3 -2
- package/dist/scripts/ssh.sh +54 -0
- package/dist/scripts/unpack.sh +3 -2
- package/package.json +3 -2
- package/dist/lib/exit.sh +0 -9
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.
|
|
3
|
-
#
|
|
2
|
+
# 🅳🅾🆃🅵🅸🅻🅴🆂 (v0.2.462) - https://dotfiles.io
|
|
3
|
+
# Made with ♥ in London, UK by @sebastienrousseau
|
|
4
|
+
# Copyright (c) 2015-2022. All rights reserved
|
|
4
5
|
# License: MIT
|
|
5
6
|
|
|
6
7
|
# 🅶🅸🆃 🅰🅻🅸🅰🆂🅴🆂 - Git aliases.
|
|
@@ -30,7 +31,8 @@
|
|
|
30
31
|
# 3.0 Aliases to show what revision and author last modified each line of a file.
|
|
31
32
|
# 3.1 Aliases to get and set repository or global options.
|
|
32
33
|
#
|
|
33
|
-
#
|
|
34
|
+
# Made with ♥ in London, UK by @sebastienrousseau
|
|
35
|
+
# Copyright (c) 2015-2022. All rights reserved
|
|
34
36
|
# Licensed under the MIT license
|
|
35
37
|
#
|
|
36
38
|
|
|
@@ -42,487 +44,491 @@
|
|
|
42
44
|
## 1.1 Aliases to work on the current change.
|
|
43
45
|
## ----------------------------------------------------------------------------
|
|
44
46
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
+
if command -v git &>/dev/null; then
|
|
48
|
+
# g: Short-form git commands.
|
|
49
|
+
alias g='git'
|
|
47
50
|
|
|
48
|
-
# ga: Add file contents to the index.
|
|
49
|
-
alias ga='git add'
|
|
51
|
+
# ga: Add file contents to the index.
|
|
52
|
+
alias ga='git add'
|
|
50
53
|
|
|
51
|
-
# gaa: Add file contents and update the index not only where the working tree has a
|
|
52
|
-
# file matching <pathspec> but also where the index already has an entry.
|
|
53
|
-
alias gaa='git add --all'
|
|
54
|
+
# gaa: Add file contents and update the index not only where the working tree has a
|
|
55
|
+
# file matching <pathspec> but also where the index already has an entry.
|
|
56
|
+
alias gaa='git add --all'
|
|
54
57
|
|
|
55
|
-
# gad: Add current directory file contents to the index.
|
|
56
|
-
alias gad='git add .'
|
|
58
|
+
# gad: Add current directory file contents to the index.
|
|
59
|
+
alias gad='git add .'
|
|
57
60
|
|
|
58
|
-
# gau: Add file contents and update the index just where it already has an entry
|
|
59
|
-
# matching <pathspec>.
|
|
60
|
-
alias gau='git add --update'
|
|
61
|
+
# gau: Add file contents and update the index just where it already has an entry
|
|
62
|
+
# matching <pathspec>.
|
|
63
|
+
alias gau='git add --update'
|
|
61
64
|
|
|
62
|
-
# gco: Undo to last commit.
|
|
63
|
-
alias gco='git checkout'
|
|
65
|
+
# gco: Undo to last commit.
|
|
66
|
+
alias gco='git checkout'
|
|
64
67
|
|
|
65
|
-
# gdis: Discard changes in a (list of) file(s) in working tree
|
|
66
|
-
alias gdis='checkout --'
|
|
68
|
+
# gdis: Discard changes in a (list of) file(s) in working tree
|
|
69
|
+
alias gdis='checkout --'
|
|
67
70
|
|
|
68
|
-
# gmv: Move or rename a file, a directory, or a symlink.
|
|
69
|
-
alias gmv='git mv'
|
|
71
|
+
# gmv: Move or rename a file, a directory, or a symlink.
|
|
72
|
+
alias gmv='git mv'
|
|
70
73
|
|
|
71
|
-
# grs: Restore working tree files.
|
|
72
|
-
alias grs='git restore'
|
|
74
|
+
# grs: Restore working tree files.
|
|
75
|
+
alias grs='git restore'
|
|
73
76
|
|
|
74
|
-
# grm: Remove files from the working tree and from the index.
|
|
75
|
-
alias grm='git remove'
|
|
77
|
+
# grm: Remove files from the working tree and from the index.
|
|
78
|
+
alias grm='git remove'
|
|
76
79
|
|
|
77
|
-
# gsc: Initialize and modify the sparse-checkout.
|
|
78
|
-
alias gsc='git sparse-checkout'
|
|
80
|
+
# gsc: Initialize and modify the sparse-checkout.
|
|
81
|
+
alias gsc='git sparse-checkout'
|
|
79
82
|
|
|
80
|
-
## ----------------------------------------------------------------------------
|
|
81
|
-
## 1.2 Aliases to start a working area.
|
|
82
|
-
## ----------------------------------------------------------------------------
|
|
83
|
+
## ----------------------------------------------------------------------------
|
|
84
|
+
## 1.2 Aliases to start a working area.
|
|
85
|
+
## ----------------------------------------------------------------------------
|
|
83
86
|
|
|
84
|
-
# gcl: Clone a repository into a new directory.
|
|
85
|
-
alias gcl='git clone'
|
|
87
|
+
# gcl: Clone a repository into a new directory.
|
|
88
|
+
alias gcl='git clone'
|
|
86
89
|
|
|
87
|
-
# gin: Create an empty Git repository or reinitialize an existing one.
|
|
88
|
-
alias gin='git init'
|
|
90
|
+
# gin: Create an empty Git repository or reinitialize an existing one.
|
|
91
|
+
alias gin='git init'
|
|
89
92
|
|
|
90
|
-
## ----------------------------------------------------------------------------
|
|
91
|
-
## 1.3 Aliases to examine the history and state.
|
|
92
|
-
## ----------------------------------------------------------------------------
|
|
93
|
+
## ----------------------------------------------------------------------------
|
|
94
|
+
## 1.3 Aliases to examine the history and state.
|
|
95
|
+
## ----------------------------------------------------------------------------
|
|
93
96
|
|
|
94
|
-
# gbs: Use binary search to find the commit that introduced a bug.
|
|
95
|
-
alias gbs='git bisect'
|
|
97
|
+
# gbs: Use binary search to find the commit that introduced a bug.
|
|
98
|
+
alias gbs='git bisect'
|
|
96
99
|
|
|
97
|
-
# gd: Show changes between commits, commit and working tree, etc.
|
|
98
|
-
alias gd='git diff'
|
|
100
|
+
# gd: Show changes between commits, commit and working tree, etc.
|
|
101
|
+
alias gd='git diff'
|
|
99
102
|
|
|
100
|
-
# gg: Print lines matching a pattern.
|
|
101
|
-
alias gg='git grep'
|
|
103
|
+
# gg: Print lines matching a pattern.
|
|
104
|
+
alias gg='git grep'
|
|
102
105
|
|
|
103
|
-
# gl: Show commit logs this month.
|
|
104
|
-
alias gl='git log --since="last month" --oneline'
|
|
106
|
+
# gl: Show commit logs this month.
|
|
107
|
+
alias gl='git log --since="last month" --oneline'
|
|
105
108
|
|
|
106
|
-
# glg: Show commit logs and Draw a text-based graphical representation of the
|
|
107
|
-
# commit history on the left hand side of the output.
|
|
108
|
-
alias glg='git log --oneline --graph --full-history --all --color --decorate'
|
|
109
|
+
# glg: Show commit logs and Draw a text-based graphical representation of the
|
|
110
|
+
# commit history on the left hand side of the output.
|
|
111
|
+
alias glg='git log --oneline --graph --full-history --all --color --decorate'
|
|
109
112
|
|
|
110
|
-
# Show various types of objects.
|
|
111
|
-
alias gs='git show'
|
|
113
|
+
# Show various types of objects.
|
|
114
|
+
alias gs='git show'
|
|
112
115
|
|
|
113
|
-
## ----------------------------------------------------------------------------
|
|
114
|
-
## 1.4 Aliases to list, create, or delete branches.
|
|
115
|
-
## ----------------------------------------------------------------------------
|
|
116
|
+
## ----------------------------------------------------------------------------
|
|
117
|
+
## 1.4 Aliases to list, create, or delete branches.
|
|
118
|
+
## ----------------------------------------------------------------------------
|
|
116
119
|
|
|
117
|
-
# gb: Create a branch.
|
|
118
|
-
alias gb='git branch'
|
|
120
|
+
# gb: Create a branch.
|
|
121
|
+
alias gb='git branch'
|
|
119
122
|
|
|
120
|
-
# gbd: Delete a branch.
|
|
121
|
-
alias gbd='git branch -d'
|
|
123
|
+
# gbd: Delete a branch.
|
|
124
|
+
alias gbd='git branch -d'
|
|
122
125
|
|
|
123
|
-
# gbl: List branches.
|
|
124
|
-
alias gbl='git branch -l'
|
|
126
|
+
# gbl: List branches.
|
|
127
|
+
alias gbl='git branch -l'
|
|
125
128
|
|
|
126
|
-
# gbr: List the remote-tracking branches.
|
|
127
|
-
alias gbr='git branch -r'
|
|
129
|
+
# gbr: List the remote-tracking branches.
|
|
130
|
+
alias gbr='git branch -r'
|
|
128
131
|
|
|
129
|
-
# gbrd: Delete the remote-tracking branches.
|
|
130
|
-
alias gbrd='git branch -d -r'
|
|
132
|
+
# gbrd: Delete the remote-tracking branches.
|
|
133
|
+
alias gbrd='git branch -d -r'
|
|
131
134
|
|
|
132
|
-
# Print a list of branches and their commits.
|
|
133
|
-
alias gbrsb='git show-branch'
|
|
135
|
+
# Print a list of branches and their commits.
|
|
136
|
+
alias gbrsb='git show-branch'
|
|
134
137
|
|
|
135
|
-
# gct: Record changes to the repository.
|
|
136
|
-
alias gct='git commit'
|
|
138
|
+
# gct: Record changes to the repository.
|
|
139
|
+
alias gct='git commit'
|
|
137
140
|
|
|
138
|
-
# gmg: Join two or more development histories together.
|
|
139
|
-
alias gmg='git merge'
|
|
141
|
+
# gmg: Join two or more development histories together.
|
|
142
|
+
alias gmg='git merge'
|
|
140
143
|
|
|
141
|
-
# grb: Reapply commits on top of another base tip.
|
|
142
|
-
alias grb='git rebase'
|
|
144
|
+
# grb: Reapply commits on top of another base tip.
|
|
145
|
+
alias grb='git rebase'
|
|
143
146
|
|
|
144
|
-
# grs: Reset current HEAD to the specified state.
|
|
145
|
-
alias grs='git reset'
|
|
147
|
+
# grs: Reset current HEAD to the specified state.
|
|
148
|
+
alias grs='git reset'
|
|
146
149
|
|
|
147
|
-
# gswb: Switch branches.
|
|
148
|
-
alias gswb='git switch'
|
|
150
|
+
# gswb: Switch branches.
|
|
151
|
+
alias gswb='git switch'
|
|
149
152
|
|
|
150
|
-
## ----------------------------------------------------------------------------
|
|
151
|
-
## 1.5 Aliases to collaborate.
|
|
152
|
-
## ----------------------------------------------------------------------------
|
|
153
|
+
## ----------------------------------------------------------------------------
|
|
154
|
+
## 1.5 Aliases to collaborate.
|
|
155
|
+
## ----------------------------------------------------------------------------
|
|
153
156
|
|
|
154
|
-
# gi: Create an empty Git repository or reinitialize an existing one.
|
|
155
|
-
alias gi='git init'
|
|
157
|
+
# gi: Create an empty Git repository or reinitialize an existing one.
|
|
158
|
+
alias gi='git init'
|
|
156
159
|
|
|
157
|
-
# gf: Download objects and refs from another repository.
|
|
158
|
-
alias gf='git fetch'
|
|
160
|
+
# gf: Download objects and refs from another repository.
|
|
161
|
+
alias gf='git fetch'
|
|
159
162
|
|
|
160
|
-
# gp: Fetch from and integrate with another repository or a local branch.
|
|
161
|
-
alias gp='git pull'
|
|
163
|
+
# gp: Fetch from and integrate with another repository or a local branch.
|
|
164
|
+
alias gp='git pull'
|
|
162
165
|
|
|
163
|
-
# Update remote refs along with associated objects.
|
|
164
|
-
alias gph='git push'
|
|
166
|
+
# Update remote refs along with associated objects.
|
|
167
|
+
alias gph='git push'
|
|
165
168
|
|
|
166
|
-
## ----------------------------------------------------------------------------
|
|
167
|
-
## 1.6 Aliases to record changes to the repository.
|
|
168
|
-
## ----------------------------------------------------------------------------
|
|
169
|
+
## ----------------------------------------------------------------------------
|
|
170
|
+
## 1.6 Aliases to record changes to the repository.
|
|
171
|
+
## ----------------------------------------------------------------------------
|
|
169
172
|
|
|
170
|
-
# Commit command to automatically "add" changes from all known files.
|
|
171
|
-
alias gc='git commit -a'
|
|
173
|
+
# Commit command to automatically "add" changes from all known files.
|
|
174
|
+
alias gc='git commit -a'
|
|
172
175
|
|
|
173
|
-
# Amend the tip of the current branch rather than creating a new commit.
|
|
174
|
-
alias gca='git commit --amend'
|
|
176
|
+
# Amend the tip of the current branch rather than creating a new commit.
|
|
177
|
+
alias gca='git commit --amend'
|
|
175
178
|
|
|
176
|
-
# Commit all changes.
|
|
177
|
-
alias gcall='git add -A && git commit -av'
|
|
179
|
+
# Commit all changes.
|
|
180
|
+
alias gcall='git add -A && git commit -av'
|
|
178
181
|
|
|
179
|
-
# Amend the tip of the current branch, and edit the message.
|
|
180
|
-
alias gcam='git commit --amend --message '
|
|
182
|
+
# Amend the tip of the current branch, and edit the message.
|
|
183
|
+
alias gcam='git commit --amend --message '
|
|
181
184
|
|
|
182
|
-
# Amend the tip of the current branch, and do not edit the message.
|
|
183
|
-
alias gcane='git commit --amend --no-edit'
|
|
185
|
+
# Amend the tip of the current branch, and do not edit the message.
|
|
186
|
+
alias gcane='git commit --amend --no-edit'
|
|
184
187
|
|
|
185
|
-
# Commit interactive.
|
|
186
|
-
alias gcint='git commit --interactive'
|
|
188
|
+
# Commit interactive.
|
|
189
|
+
alias gcint='git commit --interactive'
|
|
187
190
|
|
|
188
|
-
# Commit with a message.
|
|
189
|
-
alias gcm='git commit --message '
|
|
191
|
+
# Commit with a message.
|
|
192
|
+
alias gcm='git commit --message '
|
|
190
193
|
|
|
191
|
-
## ----------------------------------------------------------------------------
|
|
192
|
-
## 1.7 Aliases to show changes between commits, commit and working tree, etc.
|
|
193
|
-
## ----------------------------------------------------------------------------
|
|
194
|
+
## ----------------------------------------------------------------------------
|
|
195
|
+
## 1.7 Aliases to show changes between commits, commit and working tree, etc.
|
|
196
|
+
## ----------------------------------------------------------------------------
|
|
194
197
|
|
|
195
|
-
# Show changes between the working tree and the index or a tree.
|
|
196
|
-
alias gd='git diff'
|
|
198
|
+
# Show changes between the working tree and the index or a tree.
|
|
199
|
+
alias gd='git diff'
|
|
197
200
|
|
|
198
|
-
# Show only names and status of changed files.
|
|
199
|
-
alias gdch='git diff --name-status'
|
|
201
|
+
# Show only names and status of changed files.
|
|
202
|
+
alias gdch='git diff --name-status'
|
|
200
203
|
|
|
201
|
-
# Show all changes of tracked files which are present in working directory and staging area.
|
|
202
|
-
alias gdh='git diff HEAD'
|
|
204
|
+
# Show all changes of tracked files which are present in working directory and staging area.
|
|
205
|
+
alias gdh='git diff HEAD'
|
|
203
206
|
|
|
204
|
-
# Show changes to files in the "staged" area.
|
|
205
|
-
alias gdstaged='git diff --staged'
|
|
207
|
+
# Show changes to files in the "staged" area.
|
|
208
|
+
alias gdstaged='git diff --staged'
|
|
206
209
|
|
|
207
|
-
# Shows the changes between the index and the HEAD (which is the last commit on this branch).
|
|
208
|
-
alias gdcached='git diff --cached'
|
|
210
|
+
# Shows the changes between the index and the HEAD (which is the last commit on this branch).
|
|
211
|
+
alias gdcached='git diff --cached'
|
|
209
212
|
|
|
210
|
-
# Generate a diffstat.
|
|
211
|
-
alias gdstat='git diff --stat --ignore-space-change -r'
|
|
213
|
+
# Generate a diffstat.
|
|
214
|
+
alias gdstat='git diff --stat --ignore-space-change -r'
|
|
212
215
|
|
|
213
|
-
## ----------------------------------------------------------------------------
|
|
214
|
-
## 1.8 Aliases to show commit logs.
|
|
215
|
-
## ----------------------------------------------------------------------------
|
|
216
|
+
## ----------------------------------------------------------------------------
|
|
217
|
+
## 1.8 Aliases to show commit logs.
|
|
218
|
+
## ----------------------------------------------------------------------------
|
|
216
219
|
|
|
217
|
-
# Show log of changes, most recent first.
|
|
218
|
-
alias glc='git log --oneline --reverse'
|
|
220
|
+
# Show log of changes, most recent first.
|
|
221
|
+
alias glc='git log --oneline --reverse'
|
|
219
222
|
|
|
220
|
-
# Show the log of the recent day.
|
|
221
|
-
alias gld='git log --since=1-day-ago'
|
|
223
|
+
# Show the log of the recent day.
|
|
224
|
+
alias gld='git log --since=1-day-ago'
|
|
222
225
|
|
|
223
|
-
# Show the date of the latest commit, in strict ISO 8601 format.
|
|
224
|
-
alias gldc='git log -1 --date-order --format=%cI'
|
|
226
|
+
# Show the date of the latest commit, in strict ISO 8601 format.
|
|
227
|
+
alias gldc='git log -1 --date-order --format=%cI'
|
|
225
228
|
|
|
226
|
-
# Show log with dates in our local timezone.
|
|
227
|
-
alias gldl='git log --date=local'
|
|
229
|
+
# Show log with dates in our local timezone.
|
|
230
|
+
alias gldl='git log --date=local'
|
|
228
231
|
|
|
229
|
-
# Show log of new commits after you fetched, with stats, excluding merges.
|
|
230
|
-
alias glf='git log ORIG_HEAD.. --stat --no-merges'
|
|
232
|
+
# Show log of new commits after you fetched, with stats, excluding merges.
|
|
233
|
+
alias glf='git log ORIG_HEAD.. --stat --no-merges'
|
|
231
234
|
|
|
232
|
-
# Show the date of the earliest commit, in strict ISO 8601 format.
|
|
233
|
-
alias glfd='!"git log --date-order --format=%cI | tail -1"'
|
|
235
|
+
# Show the date of the earliest commit, in strict ISO 8601 format.
|
|
236
|
+
alias glfd='!"git log --date-order --format=%cI | tail -1"'
|
|
234
237
|
|
|
235
|
-
# Visualization of branch topology.
|
|
236
|
-
alias glfh='git log --graph --full-history --all --color'
|
|
238
|
+
# Visualization of branch topology.
|
|
239
|
+
alias glfh='git log --graph --full-history --all --color'
|
|
237
240
|
|
|
238
|
-
# Show log as a graph.
|
|
239
|
-
alias glg='git log --graph --all --oneline --decorate'
|
|
241
|
+
# Show log as a graph.
|
|
242
|
+
alias glg='git log --graph --all --oneline --decorate'
|
|
240
243
|
|
|
241
|
-
# Show the log of the recent hour.
|
|
242
|
-
alias glh='git log --since=1-hour-ago'
|
|
244
|
+
# Show the log of the recent hour.
|
|
245
|
+
alias glh='git log --since=1-hour-ago'
|
|
243
246
|
|
|
244
|
-
# Show log in our preferred format for our key performance indicators. A.k.a. `ll`.
|
|
245
|
-
alias gll='git log --graph --topo-order --date=short --abbrev-commit --decorate --all --boundary --pretty=format:"%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn]%Creset %Cblue%G?%Creset"'
|
|
247
|
+
# Show log in our preferred format for our key performance indicators. A.k.a. `ll`.
|
|
248
|
+
alias gll='git log --graph --topo-order --date=short --abbrev-commit --decorate --all --boundary --pretty=format:"%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn]%Creset %Cblue%G?%Creset"'
|
|
246
249
|
|
|
247
|
-
# Show log in our preferred format for our key performance indicators, with long items. A.k.a. `lll`.
|
|
248
|
-
alias glll='git log --graph --topo-order --date=iso8601-strict --no-abbrev-commit --decorate --all --boundary --pretty=format:"%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn <%ce>]%Creset %Cblue%G?%Creset"'
|
|
250
|
+
# Show log in our preferred format for our key performance indicators, with long items. A.k.a. `lll`.
|
|
251
|
+
alias glll='git log --graph --topo-order --date=iso8601-strict --no-abbrev-commit --decorate --all --boundary --pretty=format:"%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn <%ce>]%Creset %Cblue%G?%Creset"'
|
|
249
252
|
|
|
250
|
-
# Show the log of the recent month.
|
|
251
|
-
alias glm='git log --since=1-month-ago'
|
|
253
|
+
# Show the log of the recent month.
|
|
254
|
+
alias glm='git log --since=1-month-ago'
|
|
252
255
|
|
|
253
|
-
# Show the log for my own commits by my own user email.
|
|
254
|
-
alias glmy='!git log --author $(git config user.email)'
|
|
256
|
+
# Show the log for my own commits by my own user email.
|
|
257
|
+
alias glmy='!git log --author $(git config user.email)'
|
|
255
258
|
|
|
256
|
-
# Show the log of the recent week.
|
|
257
|
-
alias glw='git log --since=1-week-ago'
|
|
259
|
+
# Show the log of the recent week.
|
|
260
|
+
alias glw='git log --since=1-week-ago'
|
|
258
261
|
|
|
259
|
-
# Show the log of the recent year.
|
|
260
|
-
alias gly='git log --since=1-year-ago'
|
|
262
|
+
# Show the log of the recent year.
|
|
263
|
+
alias gly='git log --since=1-year-ago'
|
|
261
264
|
|
|
262
|
-
## ----------------------------------------------------------------------------
|
|
263
|
-
## 1.9 Aliases to switch branches or restore working tree files.
|
|
264
|
-
## ----------------------------------------------------------------------------
|
|
265
|
+
## ----------------------------------------------------------------------------
|
|
266
|
+
## 1.9 Aliases to switch branches or restore working tree files.
|
|
267
|
+
## ----------------------------------------------------------------------------
|
|
265
268
|
|
|
266
|
-
# Clean and discard changes and untracked files in working tree.
|
|
267
|
-
alias gclout='git clean -df && git checkout -- .'
|
|
269
|
+
# Clean and discard changes and untracked files in working tree.
|
|
270
|
+
alias gclout='git clean -df && git checkout -- .'
|
|
268
271
|
|
|
269
|
-
# Switch branches or restore working tree files.
|
|
270
|
-
alias gco='git checkout'
|
|
272
|
+
# Switch branches or restore working tree files.
|
|
273
|
+
alias gco='git checkout'
|
|
271
274
|
|
|
272
|
-
# Create a new branch named <new_branch> and start it at <start_point>.
|
|
273
|
-
alias gcb='git checkout -b'
|
|
275
|
+
# Create a new branch named <new_branch> and start it at <start_point>.
|
|
276
|
+
alias gcb='git checkout -b'
|
|
274
277
|
|
|
275
|
-
# Delete all local branches that have been merged into the local main branch.
|
|
276
|
-
alias gcode='git checkout main && git branch --merged | xargs git branch --delete'
|
|
278
|
+
# Delete all local branches that have been merged into the local main branch.
|
|
279
|
+
alias gcode='git checkout main && git branch --merged | xargs git branch --delete'
|
|
277
280
|
|
|
278
|
-
# Ensure local is like the main branch.
|
|
279
|
-
alias gcom='git checkout main && git fetch origin --prune && git reset --hard origin/main'
|
|
281
|
+
# Ensure local is like the main branch.
|
|
282
|
+
alias gcom='git checkout main && git fetch origin --prune && git reset --hard origin/main'
|
|
280
283
|
|
|
281
|
-
## ----------------------------------------------------------------------------
|
|
282
|
-
## 2.0 Aliases to update remote refs along with associated objects.
|
|
283
|
-
## ----------------------------------------------------------------------------
|
|
284
|
+
## ----------------------------------------------------------------------------
|
|
285
|
+
## 2.0 Aliases to update remote refs along with associated objects.
|
|
286
|
+
## ----------------------------------------------------------------------------
|
|
284
287
|
|
|
285
|
-
# Publish the current branch by pushing it to the remote "origin", and setting
|
|
286
|
-
# the current branch to track the upstream branch.
|
|
287
|
-
alias gpb='git push --set-upstream origin $(git current-branch)'
|
|
288
|
+
# Publish the current branch by pushing it to the remote "origin", and setting
|
|
289
|
+
# the current branch to track the upstream branch.
|
|
290
|
+
alias gpb='git push --set-upstream origin $(git current-branch)'
|
|
288
291
|
|
|
289
|
-
# Push local changes to the online repository.
|
|
290
|
-
alias gpo='git push origin'
|
|
292
|
+
# Push local changes to the online repository.
|
|
293
|
+
alias gpo='git push origin'
|
|
291
294
|
|
|
292
|
-
# Push local tags.
|
|
293
|
-
alias gpt='git push --tags'
|
|
295
|
+
# Push local tags.
|
|
296
|
+
alias gpt='git push --tags'
|
|
294
297
|
|
|
295
|
-
# Push each of your local git branches to the remote repository
|
|
296
|
-
alias gpoll='git push origin --all'
|
|
298
|
+
# Push each of your local git branches to the remote repository
|
|
299
|
+
alias gpoll='git push origin --all'
|
|
297
300
|
|
|
298
|
-
# Fetch from and integrate with another repository or a local branch.
|
|
299
|
-
alias gpull='git pull'
|
|
301
|
+
# Fetch from and integrate with another repository or a local branch.
|
|
302
|
+
alias gpull='git pull'
|
|
300
303
|
|
|
301
|
-
# Pull changes from the locally stored branch origin/master and merge that to
|
|
302
|
-
# the local checked-out branch.
|
|
303
|
-
alias gpullm='git pull origin master'
|
|
304
|
+
# Pull changes from the locally stored branch origin/master and merge that to
|
|
305
|
+
# the local checked-out branch.
|
|
306
|
+
alias gpullm='git pull origin master'
|
|
304
307
|
|
|
305
|
-
# Do a pull for just one branch.
|
|
306
|
-
alias gpullo='git pull origin $(git current-branch)'
|
|
308
|
+
# Do a pull for just one branch.
|
|
309
|
+
alias gpullo='git pull origin $(git current-branch)'
|
|
307
310
|
|
|
308
|
-
# Update remote refs along with associated objects.
|
|
309
|
-
alias gpush='git push'
|
|
311
|
+
# Update remote refs along with associated objects.
|
|
312
|
+
alias gpush='git push'
|
|
310
313
|
|
|
311
|
-
# Do a push for just one branch.
|
|
312
|
-
alias gpusho='git push origin $(git current-branch)'
|
|
314
|
+
# Do a push for just one branch.
|
|
315
|
+
alias gpusho='git push origin $(git current-branch)'
|
|
313
316
|
|
|
314
|
-
# For each remote branch, push it.
|
|
315
|
-
alias gpushr='git remote | xargs -I% -n1 git push %'
|
|
317
|
+
# For each remote branch, push it.
|
|
318
|
+
alias gpushr='git remote | xargs -I% -n1 git push %'
|
|
316
319
|
|
|
317
|
-
# Unpublish the current branch by deleting the remote version of the current branch.
|
|
318
|
-
alias gunpub='git push origin :$(git current-branch)'
|
|
320
|
+
# Unpublish the current branch by deleting the remote version of the current branch.
|
|
321
|
+
alias gunpub='git push origin :$(git current-branch)'
|
|
319
322
|
|
|
320
|
-
# Push current branch
|
|
321
|
-
# alias gpcb='git push origin "$(git branch|grep '\*'|tr -d '* \n')"'
|
|
323
|
+
# Push current branch
|
|
324
|
+
# alias gpcb='git push origin "$(git branch|grep '\*'|tr -d '* \n')"'
|
|
322
325
|
|
|
323
|
-
## ----------------------------------------------------------------------------
|
|
324
|
-
## 2.1 Aliases to manage set of tracked repositories.
|
|
325
|
-
## ----------------------------------------------------------------------------
|
|
326
|
+
## ----------------------------------------------------------------------------
|
|
327
|
+
## 2.1 Aliases to manage set of tracked repositories.
|
|
328
|
+
## ----------------------------------------------------------------------------
|
|
326
329
|
|
|
327
|
-
# Manage set of tracked repositories.
|
|
328
|
-
alias gr='git remote'
|
|
330
|
+
# Manage set of tracked repositories.
|
|
331
|
+
alias gr='git remote'
|
|
329
332
|
|
|
330
|
-
# Add a remote named <name> for the repository at <url>.
|
|
331
|
-
alias gra='git remote add'
|
|
333
|
+
# Add a remote named <name> for the repository at <url>.
|
|
334
|
+
alias gra='git remote add'
|
|
332
335
|
|
|
333
|
-
# Push all branches to all remotes.
|
|
334
|
-
alias grall='git remote | xargs -L1 git push --all'
|
|
336
|
+
# Push all branches to all remotes.
|
|
337
|
+
alias grall='git remote | xargs -L1 git push --all'
|
|
335
338
|
|
|
336
|
-
# Git remote all remotes except origin.
|
|
337
|
-
# alias grallo="git remote -v | grep "(fetch)" | sed -e 's#[[:blank:]].*##g' | grep -v "origin" | xargs -n 1 git remote rm"
|
|
339
|
+
# Git remote all remotes except origin.
|
|
340
|
+
# alias grallo="git remote -v | grep "(fetch)" | sed -e 's#[[:blank:]].*##g' | grep -v "origin" | xargs -n 1 git remote rm"
|
|
338
341
|
|
|
339
|
-
# Add a new remote 'origin' if it doesn't exist.
|
|
340
|
-
alias grao='git remote add origin'
|
|
342
|
+
# Add a new remote 'origin' if it doesn't exist.
|
|
343
|
+
alias grao='git remote add origin'
|
|
341
344
|
|
|
342
|
-
# Rollback to stage.
|
|
343
|
-
alias grbk='git reset --soft HEAD^'
|
|
345
|
+
# Rollback to stage.
|
|
346
|
+
alias grbk='git reset --soft HEAD^'
|
|
344
347
|
|
|
345
|
-
# Deletes all stale remote-tracking branches under <name>.
|
|
346
|
-
alias grcl='git remote prune'
|
|
348
|
+
# Deletes all stale remote-tracking branches under <name>.
|
|
349
|
+
alias grcl='git remote prune'
|
|
347
350
|
|
|
348
|
-
# Show GIT Remote Origin for each immediate subfolder.
|
|
349
|
-
# alias grf="find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "cd '{}' && echo '{}' && git config --get remote.origin.url" \;"
|
|
351
|
+
# Show GIT Remote Origin for each immediate subfolder.
|
|
352
|
+
# alias grf="find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "cd '{}' && echo '{}' && git config --get remote.origin.url" \;"
|
|
350
353
|
|
|
351
|
-
# Fetch all git remotes for a repo.
|
|
352
|
-
# alias grfall="git branch -r | awk -F'/' '{print "git fetch "$1,$2}' | xargs -I {} sh -c {}"
|
|
354
|
+
# Fetch all git remotes for a repo.
|
|
355
|
+
# alias grfall="git branch -r | awk -F'/' '{print "git fetch "$1,$2}' | xargs -I {} sh -c {}"
|
|
353
356
|
|
|
354
|
-
# For each remote branch, push it.
|
|
355
|
-
alias grp="git remote | xargs -I% -n1 git push %"
|
|
357
|
+
# For each remote branch, push it.
|
|
358
|
+
alias grp="git remote | xargs -I% -n1 git push %"
|
|
356
359
|
|
|
357
|
-
# Push all remotes.
|
|
358
|
-
# Print the url for the current repo.
|
|
359
|
-
alias grprint="git remote -v | sed -n '/github.com.*push/{s/^[^[:space:]]\+[[:space:]]\+//;s|git@github.com:|https://github.com/|;s/\.git.*//;p}"
|
|
360
|
+
# Push all remotes.
|
|
361
|
+
# Print the url for the current repo.
|
|
362
|
+
alias grprint="git remote -v | sed -n '/github.com.*push/{s/^[^[:space:]]\+[[:space:]]\+//;s|git@github.com:|https://github.com/|;s/\.git.*//;p}"
|
|
360
363
|
|
|
361
|
-
# Gives some information about the remote <name>.
|
|
362
|
-
alias grs='git show'
|
|
364
|
+
# Gives some information about the remote <name>.
|
|
365
|
+
alias grs='git show'
|
|
363
366
|
|
|
364
|
-
# Display where the origin resides.
|
|
365
|
-
alias grso='git remote show origin'
|
|
367
|
+
# Display where the origin resides.
|
|
368
|
+
alias grso='git remote show origin'
|
|
366
369
|
|
|
367
|
-
# Fetch updates for a named set of remotes in the repository as defined by remotes.
|
|
368
|
-
alias gru='git remote update'
|
|
370
|
+
# Fetch updates for a named set of remotes in the repository as defined by remotes.
|
|
371
|
+
alias gru='git remote update'
|
|
369
372
|
|
|
370
|
-
# Shows URLs of remote repositories when listing your current remote connections.
|
|
371
|
-
alias grv='git remote -v'
|
|
373
|
+
# Shows URLs of remote repositories when listing your current remote connections.
|
|
374
|
+
alias grv='git remote -v'
|
|
372
375
|
|
|
373
|
-
## ----------------------------------------------------------------------------
|
|
374
|
-
## 2.2 Aliases to revert some existing commits.
|
|
375
|
-
## ----------------------------------------------------------------------------
|
|
376
|
+
## ----------------------------------------------------------------------------
|
|
377
|
+
## 2.2 Aliases to revert some existing commits.
|
|
378
|
+
## ----------------------------------------------------------------------------
|
|
376
379
|
|
|
377
|
-
alias grev='git revert' # Undo the changes from some existing commits
|
|
378
|
-
alias grevnc='git revert --no-commit' # Revert without autocommit; useful when you're reverting more than one commits' effect to your index in a row.
|
|
380
|
+
alias grev='git revert' # Undo the changes from some existing commits
|
|
381
|
+
alias grevnc='git revert --no-commit' # Revert without autocommit; useful when you're reverting more than one commits' effect to your index in a row.
|
|
379
382
|
|
|
380
|
-
## ----------------------------------------------------------------------------
|
|
381
|
-
## 2.3 Aliases to initialize, update or inspect submodules.
|
|
382
|
-
## ----------------------------------------------------------------------------
|
|
383
|
+
## ----------------------------------------------------------------------------
|
|
384
|
+
## 2.3 Aliases to initialize, update or inspect submodules.
|
|
385
|
+
## ----------------------------------------------------------------------------
|
|
383
386
|
|
|
384
|
-
# Enables foreign repositories to be embedded within a dedicated subdirectory of the source tree.
|
|
385
|
-
alias gsm='git submodule'
|
|
387
|
+
# Enables foreign repositories to be embedded within a dedicated subdirectory of the source tree.
|
|
388
|
+
alias gsm='git submodule'
|
|
386
389
|
|
|
387
|
-
# Initialize the submodules recorded in the index
|
|
388
|
-
alias gsmi='git submodule init'
|
|
390
|
+
# Initialize the submodules recorded in the index
|
|
391
|
+
alias gsmi='git submodule init'
|
|
389
392
|
|
|
390
|
-
# Add the given repository as a submodule at the given path to the changeset to be committed next to the current project: the current project is termed the "superproject".
|
|
391
|
-
alias gsma='git submodule add'
|
|
393
|
+
# Add the given repository as a submodule at the given path to the changeset to be committed next to the current project: the current project is termed the "superproject".
|
|
394
|
+
alias gsma='git submodule add'
|
|
392
395
|
|
|
393
|
-
# Synchronizes submodules' remote URL configuration setting to the value specified in .gitmodules.
|
|
394
|
-
alias gsms='git submodule sync'
|
|
396
|
+
# Synchronizes submodules' remote URL configuration setting to the value specified in .gitmodules.
|
|
397
|
+
alias gsms='git submodule sync'
|
|
395
398
|
|
|
396
|
-
# Update the registered submodules to match what the superproject expects by cloning missing submodules, fetching missing commits in submodules and updating the working tree of the submodules.
|
|
397
|
-
alias gsmu='git submodule update'
|
|
399
|
+
# Update the registered submodules to match what the superproject expects by cloning missing submodules, fetching missing commits in submodules and updating the working tree of the submodules.
|
|
400
|
+
alias gsmu='git submodule update'
|
|
398
401
|
|
|
399
|
-
# Submodule update with initialize
|
|
400
|
-
alias gsmui='git submodule update --init'
|
|
402
|
+
# Submodule update with initialize
|
|
403
|
+
alias gsmui='git submodule update --init'
|
|
401
404
|
|
|
402
|
-
# Submodule update with initialize and recursive; this is useful to bring a submodule fully up to date.
|
|
403
|
-
alias gsmuir='git submodule update --init --recursive'
|
|
405
|
+
# Submodule update with initialize and recursive; this is useful to bring a submodule fully up to date.
|
|
406
|
+
alias gsmuir='git submodule update --init --recursive'
|
|
404
407
|
|
|
405
|
-
## ----------------------------------------------------------------------------
|
|
406
|
-
## 2.4 Aliases to show the working tree status.
|
|
407
|
-
## ----------------------------------------------------------------------------
|
|
408
|
+
## ----------------------------------------------------------------------------
|
|
409
|
+
## 2.4 Aliases to show the working tree status.
|
|
410
|
+
## ----------------------------------------------------------------------------
|
|
408
411
|
|
|
409
|
-
# Show the working tree status.
|
|
410
|
-
alias gst='git status'
|
|
412
|
+
# Show the working tree status.
|
|
413
|
+
alias gst='git status'
|
|
411
414
|
|
|
412
|
-
# Stash the changes.
|
|
413
|
-
alias gsta='git stash save '
|
|
415
|
+
# Stash the changes.
|
|
416
|
+
alias gsta='git stash save '
|
|
414
417
|
|
|
415
|
-
# Remove untracked files in a git repository.
|
|
416
|
-
# alias gstrmu='git status -su | cut -d' ' -f2- | tr "\n" "\0" | xargs -0 rm'
|
|
418
|
+
# Remove untracked files in a git repository.
|
|
419
|
+
# alias gstrmu='git status -su | cut -d' ' -f2- | tr "\n" "\0" | xargs -0 rm'
|
|
417
420
|
|
|
418
|
-
# Status with short format instead of full details.
|
|
419
|
-
alias gsts='git status --short'
|
|
421
|
+
# Status with short format instead of full details.
|
|
422
|
+
alias gsts='git status --short'
|
|
420
423
|
|
|
421
|
-
# Status with short format and showing branch and tracking info.
|
|
422
|
-
alias gstsb='git status --short --branch'
|
|
424
|
+
# Status with short format and showing branch and tracking info.
|
|
425
|
+
alias gstsb='git status --short --branch'
|
|
423
426
|
|
|
424
|
-
## ----------------------------------------------------------------------------
|
|
425
|
-
## 2.5 Aliases to create, list, delete or verify a tag object signed with GPG.
|
|
426
|
-
## ----------------------------------------------------------------------------
|
|
427
|
+
## ----------------------------------------------------------------------------
|
|
428
|
+
## 2.5 Aliases to create, list, delete or verify a tag object signed with GPG.
|
|
429
|
+
## ----------------------------------------------------------------------------
|
|
427
430
|
|
|
428
|
-
# See all tags.
|
|
429
|
-
alias gt='git tag'
|
|
431
|
+
# See all tags.
|
|
432
|
+
alias gt='git tag'
|
|
430
433
|
|
|
431
|
-
# Create, list, delete or verify a tag object signed with GPG.
|
|
432
|
-
alias gtg='git tag'
|
|
434
|
+
# Create, list, delete or verify a tag object signed with GPG.
|
|
435
|
+
alias gtg='git tag'
|
|
433
436
|
|
|
434
|
-
# Last tag in the current branch.
|
|
435
|
-
alias gtl='git describe --tags --abbrev=0'
|
|
437
|
+
# Last tag in the current branch.
|
|
438
|
+
alias gtl='git describe --tags --abbrev=0'
|
|
436
439
|
|
|
437
|
-
## ----------------------------------------------------------------------------
|
|
438
|
-
## 2.6 Aliases to show various types of objects.
|
|
439
|
-
## ----------------------------------------------------------------------------
|
|
440
|
+
## ----------------------------------------------------------------------------
|
|
441
|
+
## 2.6 Aliases to show various types of objects.
|
|
442
|
+
## ----------------------------------------------------------------------------
|
|
440
443
|
|
|
441
|
-
# Show various types of objects
|
|
442
|
-
alias gshow='git show'
|
|
444
|
+
# Show various types of objects
|
|
445
|
+
alias gshow='git show'
|
|
443
446
|
|
|
444
|
-
# Find the nearest parent branch of the current git branch.
|
|
445
|
-
# alias gshf='git show-branch -a | grep '\*' | grep -v 'git rev-parse --abbrev-ref HEAD' | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//''
|
|
447
|
+
# Find the nearest parent branch of the current git branch.
|
|
448
|
+
# alias gshf='git show-branch -a | grep '\*' | grep -v 'git rev-parse --abbrev-ref HEAD' | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//''
|
|
446
449
|
|
|
447
|
-
# Show list of files changed by commit.
|
|
448
|
-
alias gshls='git show --relative --pretty=format:'''
|
|
450
|
+
# Show list of files changed by commit.
|
|
451
|
+
alias gshls='git show --relative --pretty=format:'''
|
|
449
452
|
|
|
450
|
-
# Given any git object, try to show it briefly.
|
|
451
|
-
alias gshnp='git show --no-patch --pretty="tformat:%h (%s, %ad)" --date=short'
|
|
453
|
+
# Given any git object, try to show it briefly.
|
|
454
|
+
alias gshnp='git show --no-patch --pretty="tformat:%h (%s, %ad)" --date=short'
|
|
452
455
|
|
|
453
|
-
# Show who contributed, in descending order by number of commits.
|
|
454
|
-
alias gshwho='git shortlog --summary --numbered --no-merges'
|
|
456
|
+
# Show who contributed, in descending order by number of commits.
|
|
457
|
+
alias gshwho='git shortlog --summary --numbered --no-merges'
|
|
455
458
|
|
|
456
|
-
## ----------------------------------------------------------------------------
|
|
457
|
-
## 2.7 Aliases to reset current HEAD to the specified state.
|
|
458
|
-
## ----------------------------------------------------------------------------
|
|
459
|
+
## ----------------------------------------------------------------------------
|
|
460
|
+
## 2.7 Aliases to reset current HEAD to the specified state.
|
|
461
|
+
## ----------------------------------------------------------------------------
|
|
459
462
|
|
|
460
|
-
# Reset commit clean.
|
|
461
|
-
alias grescl='git reset --hard HEAD~1 && git clean -fd'
|
|
463
|
+
# Reset commit clean.
|
|
464
|
+
alias grescl='git reset --hard HEAD~1 && git clean -fd'
|
|
462
465
|
|
|
463
|
-
# Reset commit hard.
|
|
464
|
-
alias gresh='git reset --hard HEAD~1'
|
|
466
|
+
# Reset commit hard.
|
|
467
|
+
alias gresh='git reset --hard HEAD~1'
|
|
465
468
|
|
|
466
|
-
# Reset pristine.
|
|
467
|
-
alias gresp='git reset --hard && git clean -ffdx'
|
|
469
|
+
# Reset pristine.
|
|
470
|
+
alias gresp='git reset --hard && git clean -ffdx'
|
|
468
471
|
|
|
469
|
-
# Reset commit.
|
|
470
|
-
alias gress='git reset --soft HEAD~1'
|
|
472
|
+
# Reset commit.
|
|
473
|
+
alias gress='git reset --soft HEAD~1'
|
|
471
474
|
|
|
472
|
-
# Reset to upstream.
|
|
473
|
-
alias gresu='git reset --hard $(git upstream-branch)'
|
|
475
|
+
# Reset to upstream.
|
|
476
|
+
alias gresu='git reset --hard $(git upstream-branch)'
|
|
474
477
|
|
|
475
|
-
## ----------------------------------------------------------------------------
|
|
476
|
-
## 2.8 Aliases to pick out and massage parameters.
|
|
477
|
-
## ----------------------------------------------------------------------------
|
|
478
|
+
## ----------------------------------------------------------------------------
|
|
479
|
+
## 2.8 Aliases to pick out and massage parameters.
|
|
480
|
+
## ----------------------------------------------------------------------------
|
|
478
481
|
|
|
479
|
-
# Get the top level directory name.
|
|
480
|
-
alias gtp='git rev-parse --show-toplevel'
|
|
482
|
+
# Get the top level directory name.
|
|
483
|
+
alias gtp='git rev-parse --show-toplevel'
|
|
481
484
|
|
|
482
|
-
# Get the current branch name.
|
|
483
|
-
alias grpa='git rev-parse --abbrev-ref HEAD'
|
|
485
|
+
# Get the current branch name.
|
|
486
|
+
alias grpa='git rev-parse --abbrev-ref HEAD'
|
|
484
487
|
|
|
485
|
-
# Get the upstream branch name.
|
|
486
|
-
# alias gub='git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)'
|
|
488
|
+
# Get the upstream branch name.
|
|
489
|
+
# alias gub='git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)'
|
|
487
490
|
|
|
488
|
-
## ----------------------------------------------------------------------------
|
|
489
|
-
## 2.9 Aliases to remove files from the working tree and from the index.
|
|
490
|
-
## ----------------------------------------------------------------------------
|
|
491
|
+
## ----------------------------------------------------------------------------
|
|
492
|
+
## 2.9 Aliases to remove files from the working tree and from the index.
|
|
493
|
+
## ----------------------------------------------------------------------------
|
|
491
494
|
|
|
492
|
-
# Remove files from the working tree and from the index.
|
|
493
|
-
alias grm='git rm'
|
|
495
|
+
# Remove files from the working tree and from the index.
|
|
496
|
+
alias grm='git rm'
|
|
494
497
|
|
|
495
|
-
# Unstage and remove paths only from the index.
|
|
496
|
-
alias grmc='git rm --cached'
|
|
498
|
+
# Unstage and remove paths only from the index.
|
|
499
|
+
alias grmc='git rm --cached'
|
|
497
500
|
|
|
498
|
-
# Remove files which have been deleted.
|
|
499
|
-
alias grmd='git ls-files -z --deleted | xargs -0 git rm'
|
|
501
|
+
# Remove files which have been deleted.
|
|
502
|
+
alias grmd='git ls-files -z --deleted | xargs -0 git rm'
|
|
500
503
|
|
|
501
|
-
# Remove files which have been deleted.
|
|
502
|
-
alias grmd2='git rm $(git ls-files --deleted)'
|
|
504
|
+
# Remove files which have been deleted.
|
|
505
|
+
alias grmd2='git rm $(git ls-files --deleted)'
|
|
503
506
|
|
|
504
|
-
# Remove .DS_Store from the repository.
|
|
505
|
-
alias grmds='find . -name .DS_Store -exec git rm --ignore-unmatch --cached {} +'
|
|
507
|
+
# Remove .DS_Store from the repository.
|
|
508
|
+
alias grmds='find . -name .DS_Store -exec git rm --ignore-unmatch --cached {} +'
|
|
506
509
|
|
|
507
|
-
# Remove for all deleted files, including those with space/quote/unprintable characters in their filename/path.
|
|
508
|
-
alias grmx='git ls-files -z -d | xargs -0 git rm --'
|
|
510
|
+
# Remove for all deleted files, including those with space/quote/unprintable characters in their filename/path.
|
|
511
|
+
alias grmx='git ls-files -z -d | xargs -0 git rm --'
|
|
509
512
|
|
|
510
|
-
## ----------------------------------------------------------------------------
|
|
511
|
-
## 3.0 Aliases to show what revision and author last modified each line of a file.
|
|
512
|
-
## ----------------------------------------------------------------------------
|
|
513
|
+
## ----------------------------------------------------------------------------
|
|
514
|
+
## 3.0 Aliases to show what revision and author last modified each line of a file.
|
|
515
|
+
## ----------------------------------------------------------------------------
|
|
513
516
|
|
|
514
|
-
# Prints per-line contribution per author for a GIT repository.
|
|
515
|
-
# alias gblau='git ls-files | xargs -n1 git blame --line-porcelain | sed -n 's/^author //p' | sort -f | uniq -ic | sort -nr'
|
|
517
|
+
# Prints per-line contribution per author for a GIT repository.
|
|
518
|
+
# alias gblau='git ls-files | xargs -n1 git blame --line-porcelain | sed -n 's/^author //p' | sort -f | uniq -ic | sort -nr'
|
|
516
519
|
|
|
517
|
-
## ----------------------------------------------------------------------------
|
|
518
|
-
## 3.1 Aliases to get and set repository or global options.
|
|
519
|
-
## ----------------------------------------------------------------------------
|
|
520
|
+
## ----------------------------------------------------------------------------
|
|
521
|
+
## 3.1 Aliases to get and set repository or global options.
|
|
522
|
+
## ----------------------------------------------------------------------------
|
|
523
|
+
|
|
524
|
+
# Better git diff, word delimited and colorized.
|
|
525
|
+
alias gconfdiff='git config alias.dcolor "diff --color-words"'
|
|
520
526
|
|
|
521
|
-
#
|
|
522
|
-
alias
|
|
527
|
+
# List all the settings.
|
|
528
|
+
alias gconfl='git config --list'
|
|
523
529
|
|
|
524
|
-
#
|
|
525
|
-
alias
|
|
530
|
+
# Output remote origin from within a local repository.
|
|
531
|
+
alias gconfr='git config --local --get remote.origin.url'
|
|
526
532
|
|
|
527
|
-
|
|
528
|
-
|
|
533
|
+
alias undopush="git push -f origin HEAD^:master" # undopush: Undo the last push.
|
|
534
|
+
fi
|