@sebastienrousseau/dotfiles 0.2.469 → 0.2.499

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