@sebastienrousseau/dotfiles 0.2.452 → 0.2.453
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/COPYRIGHT +1 -1
- package/Makefile +1 -1
- package/README.md +111 -48
- package/bin/dotfiles.sh +13 -6
- package/package.json +2 -2
- package/pnpm-lock.yaml +140 -86
- package/shell/aliases/default/default.aliases.sh +1 -1
- package/shell/aliases/gcloud/gcloud.aliases.sh +1 -1
- package/shell/aliases/git/git.aliases.wip +1 -1
- package/shell/aliases/heroku/heroku.aliases.sh +1 -1
- package/shell/aliases/jekyll/jekyll.aliases.sh +1 -1
- package/shell/aliases/pnpm/pnpm.aliases.sh +1 -1
- package/shell/aliases/subversion/subversion.aliases.sh +1 -1
- package/shell/aliases/tmux/tmux.aliases.sh +1 -1
- package/shell/aliases.sh +1 -1
- package/shell/configurations/bash/bashrc +2 -2
- package/shell/configurations/curl/curlrc +1 -1
- package/shell/configurations/default/color.sh +1 -1
- package/shell/configurations/default/editor.sh +1 -1
- package/shell/configurations/default/prompt.sh +6 -6
- package/shell/configurations/inputrc/inputrc +2 -2
- package/shell/configurations/profile/profile +1 -1
- package/shell/configurations/tmux/tmux +2 -2
- package/shell/configurations/vim/vimrc +1 -1
- package/shell/configurations/wget/wgetrc +1 -1
- package/shell/configurations/zsh/zshrc +12 -2
- package/shell/configurations.sh +1 -1
- package/shell/exit.sh +1 -1
- package/shell/functions/cdls.sh +1 -1
- package/shell/functions/{changediskpwd.sh → changediskpwd.wip} +1 -1
- package/shell/functions/{code.sh → code.wip} +1 -1
- package/shell/functions/{countdown.sh → countdown.wip} +1 -1
- package/shell/functions/curlheader.sh +1 -1
- package/shell/functions/curltime.sh +1 -1
- package/shell/functions/encode64.sh +1 -1
- package/shell/functions/environment.sh +8 -8
- package/shell/functions/extract.sh +2 -2
- package/shell/functions/genpwd.sh +1 -1
- package/shell/functions/goto.sh +2 -2
- package/shell/functions/{headers.sh → headers.wip} +0 -0
- package/shell/functions/hidehiddenfiles.sh +1 -1
- package/shell/functions/{history-all.sh → history-all.wip} +1 -1
- package/shell/functions/hostinfo.sh +1 -1
- package/shell/functions/hstats.sh +1 -1
- package/shell/functions/httpdebug.sh +1 -1
- package/shell/functions/keygen.sh +4 -4
- package/shell/functions/last.sh +1 -1
- package/shell/functions/logout.sh +1 -1
- package/shell/functions/lowercase.sh +1 -1
- package/shell/functions/macos.sh +1 -1
- package/shell/functions/matrix.sh +1 -1
- package/shell/functions/mcd.sh +1 -1
- package/shell/functions/mount_read_only.sh +1 -1
- package/shell/functions/myproc.sh +2 -2
- package/shell/functions/prependpath.sh +1 -1
- package/shell/functions/print.wip +13 -0
- package/shell/functions/ql.sh +1 -1
- package/shell/functions/rd.sh +1 -1
- package/shell/functions/remove_disk.sh +1 -1
- package/shell/functions/ren.sh +2 -2
- package/shell/functions/{rm.sh → rm.wip} +1 -1
- package/shell/functions/{rps.sh → rps.wip} +1 -1
- package/shell/functions/showhiddenfiles.sh +1 -1
- package/shell/functions/size.sh +1 -1
- package/shell/functions/stopwatch.sh +1 -1
- package/shell/functions/{trash.sh → trash.wip} +1 -1
- package/shell/functions/{tree.sh → tree.wip} +1 -1
- package/shell/functions/uppercase.sh +2 -2
- package/shell/functions/uuidgen.wip +27 -0
- package/shell/functions/view-source.sh +1 -1
- package/shell/functions/vscode.sh +1 -1
- package/shell/functions/whoisport.sh +1 -1
- package/shell/functions/zipf.sh +1 -1
- package/shell/functions.sh +1 -1
- package/shell/history.sh +3 -6
- package/shell/paths/ant/ant.paths.sh +1 -1
- package/shell/paths/default/default.paths.sh +1 -1
- package/shell/paths/homebrew/homebrew.paths.sh +4 -1
- package/shell/paths/java/java.paths.sh +1 -1
- package/shell/paths/maven/maven.paths.sh +3 -2
- package/shell/paths/node/node.paths.sh +2 -2
- package/shell/paths/nvm/nvm.paths.sh +1 -1
- package/shell/paths/pnpm/pnpm.paths.sh +2 -2
- package/shell/paths/python/python.paths.sh +19 -0
- package/shell/paths/ruby/ruby.paths.sh +1 -1
- package/shell/paths/tmux/tmux.paths.sh +2 -3
- package/shell/paths.sh +1 -1
- package/shell/aliases/README.md +0 -327
- package/shell/aliases/gcloud/README.md +0 -117
- package/shell/aliases/git/README.md +0 -279
- package/shell/aliases/heroku/README.md +0 -457
- package/shell/aliases/jekyll/README.md +0 -32
- package/shell/aliases/pnpm/README.md +0 -3
- package/shell/aliases/subversion/README.md +0 -54
- package/shell/aliases/tmux/README.md +0 -0
- package/shell/functions/print.sh +0 -13
- package/shell/functions/uuidgen.sh +0 -27
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
# Dotfiles aliases
|
|
2
|
-
|
|
3
|
-

|
|
4
|
-
|
|
5
|
-
The `git.plugin.zsh` file creates helpful shortcut aliases for many commonly
|
|
6
|
-
[Git](https://www.heroku.com/) commands.
|
|
7
|
-
|
|
8
|
-
## Table of Contents
|
|
9
|
-
|
|
10
|
-
- [Dotfiles aliases](#dotfiles-aliases)
|
|
11
|
-
- [Table of Contents](#table-of-contents)
|
|
12
|
-
- [1.0 Git Core Aliases](#10-git-core-aliases)
|
|
13
|
-
- [1.1 Aliases to work on the current change](#11-aliases-to-work-on-the-current-change)
|
|
14
|
-
- [1.2 Aliases to start a working area](#12-aliases-to-start-a-working-area)
|
|
15
|
-
- [1.3 Aliases to examine the history and state](#13-aliases-to-examine-the-history-and-state)
|
|
16
|
-
- [1.4 Aliases to list, create, or delete branches](#14-aliases-to-list-create-or-delete-branches)
|
|
17
|
-
- [1.5 Aliases to collaborate](#15-aliases-to-collaborate)
|
|
18
|
-
- [1.6 Aliases to record changes to the repository](#16-aliases-to-record-changes-to-the-repository)
|
|
19
|
-
- [1.7 Aliases to show changes between commits, commit and working tree, etc](#17-aliases-to-show-changes-between-commits-commit-and-working-tree-etc)
|
|
20
|
-
- [1.8 Aliases to show commit logs](#18-aliases-to-show-commit-logs)
|
|
21
|
-
- [1.9 Aliases to switch branches or restore working tree files](#19--aliases-to-switch-branches-or-restore-working-tree-files)
|
|
22
|
-
- [2.0 Aliases to update remote refs along with associated objects](#20-aliases-to-update-remote-refs-along-with-associated-objects)
|
|
23
|
-
- [2.1 Aliases to manage set of tracked repositories](#21-aliases-to-manage-set-of-tracked-repositories)
|
|
24
|
-
- [2.2 Aliases to revert some existing commits](#22-aliases-to-revert-some-existing-commits)
|
|
25
|
-
- [2.3 Aliases to initialize, update or inspect submodules](#23-aliases-to-initialize-update-or-inspect-submodules)
|
|
26
|
-
- [2.4 Aliases to show the working tree status](#24-aliases-to-show-the-working-tree-status)
|
|
27
|
-
- [2.5 Aliases to create, list, delete or verify a tag object signed with GPG](#25-aliases-to-create-list-delete-or-verify-a-tag-object-signed-with-gpg)
|
|
28
|
-
- [2.6 Aliases to show various types of objects](#26-aliases-to-show-various-types-of-objects)
|
|
29
|
-
- [2.7 Aliases to reset current HEAD to the specified state](#27-aliases-to-reset-current-head-to-the-specified-state)
|
|
30
|
-
- [2.8 Aliases to pick out and massage parameters](#28-aliases-to-pick-out-and-massage-parameters)
|
|
31
|
-
- [2.9 Aliases to remove files from the working tree and from the index.](#29-aliases-to-remove-files-from-the-working-tree-and-from-the-index)
|
|
32
|
-
- [3.0 Aliases to show what revision and author last modified each line of a file](#30-aliases-to-show-what-revision-and-author-last-modified-each-line-of-a-file)
|
|
33
|
-
- [3.1 Aliases to get and set repository or global options](#31-aliases-to-get-and-set-repository-or-global-options)
|
|
34
|
-
|
|
35
|
-
### 1.0 Git Core Aliases
|
|
36
|
-
|
|
37
|
-
### 1.1 Aliases to work on the current change
|
|
38
|
-
|
|
39
|
-
| Alias | Command | Description |
|
|
40
|
-
| ----- | ---------------------------------------- | -------------------------------------------------- |
|
|
41
|
-
| g | `git` | Short-form git commands. |
|
|
42
|
-
| ga | `git add` | Add file contents to the index. |
|
|
43
|
-
| gaa | `git add --all` | Add file contents and update the index not only where the working tree has a file matching <pathspec> but also where the index already has an entry. |
|
|
44
|
-
| gad | `git add .` | Add current directory file contents to the index. |
|
|
45
|
-
| gau | `git add --update` | Add file contents and update the index just where it already has an entry matching <pathspec>. |
|
|
46
|
-
| gco | `git checkout` | Undo to last commit. |
|
|
47
|
-
| gdis | `git checkout --` | Discard changes in a (list of) file(s) in working tree. |
|
|
48
|
-
| gmv | `git mv` | Move or rename a file, a directory, or a symlink. |
|
|
49
|
-
| grs | `git restore` | Restore working tree files. |
|
|
50
|
-
| gsc | `git sparse-checkout` | Initialize and modify the sparse-checkout. |
|
|
51
|
-
|
|
52
|
-
### 1.2 Aliases to start a working area
|
|
53
|
-
|
|
54
|
-
| Alias | Command | Description |
|
|
55
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
56
|
-
| gcl | `git clone` | Clone a repository into a new directory. |
|
|
57
|
-
| gin | `git init` | Create an empty Git repository or reinitialize an existing one. |
|
|
58
|
-
|
|
59
|
-
### 1.3 Aliases to examine the history and state
|
|
60
|
-
|
|
61
|
-
| Alias | Command | Description |
|
|
62
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
63
|
-
| gbs | `git bisect` | Use binary search to find the commit that introduced a bug. |
|
|
64
|
-
| gd | `git diff` | Show changes between commits, commit and working tree, etc. |
|
|
65
|
-
| gg | `git grep` | Print lines matching a pattern. |
|
|
66
|
-
| gl | `git log --since="last month" --oneline` | Show commit logs this month. |
|
|
67
|
-
| glg | `git log --oneline --graph --full-history --all --color --decorate` | Show commit logs and Draw a text-based graphical representation of the commit history on the left hand side of the output. |
|
|
68
|
-
| gs | `git show` | Show various types of objects. |
|
|
69
|
-
|
|
70
|
-
### 1.4 Aliases to list, create, or delete branches
|
|
71
|
-
|
|
72
|
-
| Alias | Command | Description |
|
|
73
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
74
|
-
| gb | `git branch` | Create a branch. |
|
|
75
|
-
| gbd | `git branch -d` | Delete a branch. |
|
|
76
|
-
| gbl | `git branch -l` | List branches. |
|
|
77
|
-
| gbr | `git branch -r` | List the remote-tracking branches. |
|
|
78
|
-
| gbrd | `git branch -d -r` | Delete the remote-tracking branches. |
|
|
79
|
-
| gbrsb | `git show-branch` | Print a list of branches and their commits. |
|
|
80
|
-
| gct | `git commit` | Record changes to the repository. |
|
|
81
|
-
| gmg | `git merge` | Join two or more development histories together. |
|
|
82
|
-
| grb | `git rebase` | Reapply commits on top of another base tip. |
|
|
83
|
-
| grs | `git reset` | Reset current HEAD to the specified state. |
|
|
84
|
-
| gswb | `git switch` | Switch branches. |
|
|
85
|
-
|
|
86
|
-
### 1.5 Aliases to collaborate
|
|
87
|
-
|
|
88
|
-
| Alias | Command | Description |
|
|
89
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
90
|
-
| gf | `git fetch` | Download objects and refs from another repository. |
|
|
91
|
-
| gi | `git init` | Create an empty Git repository or reinitialize an existing one. |
|
|
92
|
-
| gp | `git pull` | Fetch from and integrate with another repository or a local branch. |
|
|
93
|
-
| gpu | `git push` | Update remote refs along with associated objects. |
|
|
94
|
-
|
|
95
|
-
### 1.6 Aliases to record changes to the repository
|
|
96
|
-
|
|
97
|
-
| Alias | Command | Description |
|
|
98
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
99
|
-
| gc | `git commit -a` | Commit command to automatically "add" changes from all known files. |
|
|
100
|
-
| gca | `git commit --amend` | Amend the tip of the current branch rather than creating a new commit. |
|
|
101
|
-
| gcall | `git add -A && git commit -av` | Commit all changes. |
|
|
102
|
-
| gcam | `git commit --amend --message ` | Amend the tip of the current branch, and edit the message. |
|
|
103
|
-
| gcane | `git commit --amend --no-edit` | Amend the tip of the current branch, and do not edit the message. |
|
|
104
|
-
| gcint | `git commit --interactive` | Commit interactive. |
|
|
105
|
-
| gcm | `git commit --message ` | Commit with a message. |
|
|
106
|
-
|
|
107
|
-
### 1.7 Aliases to show changes between commits, commit and working tree, etc
|
|
108
|
-
|
|
109
|
-
| Alias | Command | Description |
|
|
110
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
111
|
-
| gd | `git diff` | Show changes between the working tree and the index or a tree. |
|
|
112
|
-
| gdcached | `git diff --cached` | Shows the changes between the index and the HEAD (which is the last commit on this branch). |
|
|
113
|
-
| gdch | `git diff --name-status` | Show only names and status of changed files. |
|
|
114
|
-
| gdh | `git diff HEAD` | Show all changes of tracked files which are present in working directory and staging area. |
|
|
115
|
-
| gdstaged | `git diff --staged` | Show changes to files in the "staged" area. |
|
|
116
|
-
| gdstat | `git diff --stat --ignore-space-change -r` | Generate a diffstat. |
|
|
117
|
-
|
|
118
|
-
### 1.8 Aliases to show commit logs
|
|
119
|
-
|
|
120
|
-
| Alias | Command | Description |
|
|
121
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
122
|
-
| gclc | `git log --oneline --reverse` | Show log of changes, most recent first. |
|
|
123
|
-
| gld | `git log --since=1-day-ago` | Show the log of the recent day |
|
|
124
|
-
| gldc | `git log -1 --date-order --format=%cI` | Show the date of the latest commit, in strict ISO 8601 format.|
|
|
125
|
-
| gldl | `git log --date=local` | Show log with dates in our local timezone. |
|
|
126
|
-
| glf | `git log ORIG_HEAD.. --stat --no-merges` | Show log of new commits after you fetched, with stats, excluding merges. |
|
|
127
|
-
| glfd | `!"git log --date-order --format=%cI | tail -1"` | Show the date of the earliest commit, in strict ISO 8601 format. |
|
|
128
|
-
| glfh | `git log --graph --full-history --all --color` | Visualization of branch topology. |
|
|
129
|
-
| glg | `git log --graph --all --oneline --decorate` | Show log as a graph. |
|
|
130
|
-
| glh | `git log --since=1-hour-ago` | Show the log of the recent hour |
|
|
131
|
-
| 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"` | Show log in our preferred format for our key performance indicators. A.k.a. `ll`. |
|
|
132
|
-
| 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"` | Show log in our preferred format for our key performance indicators, with long items. A.k.a. `lll`. |
|
|
133
|
-
| glm | `git log --since=1-month-ago` | Show the log of the recent month |
|
|
134
|
-
| glmy | `!git log --author $(git config user.email)` | Show the log for my own commits by my own user email. |
|
|
135
|
-
| glw | `git log --since=1-week-ago` | Show the log of the recent week |
|
|
136
|
-
| gly | `git log --since=1-year-ago` | Show the log of the recent year |
|
|
137
|
-
|
|
138
|
-
### 1.9 Aliases to switch branches or restore working tree files
|
|
139
|
-
|
|
140
|
-
| Alias | Command | Description |
|
|
141
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
142
|
-
| gclout | `git clean -df && git checkout -- .` | Clean and discard changes and un-tracked files in working tree. |
|
|
143
|
-
| gco | `git checkout` | Switch branches or restore working tree files. |
|
|
144
|
-
| gcob | `git checkout -b` | Create a new branch named <new_branch> and start it at <start_point>. |
|
|
145
|
-
| gcode | `git checkout main && git branch --merged | xargs git branch --delete` | Delete all local branches that have been merged into the local main branch. |
|
|
146
|
-
| gcom | `git checkout main && git fetch origin --prune && git reset --hard origin/main` | Ensure local is like the main branch. |
|
|
147
|
-
|
|
148
|
-
### 2.0 Aliases to update remote refs along with associated objects
|
|
149
|
-
|
|
150
|
-
| Alias | Command | Description |
|
|
151
|
-
| ----- | ---------------------------------------- | ------------------------------ |
|
|
152
|
-
| gpb | `git push --set-upstream origin $(git current-branch)` | Publish the current branch by pushing it to the remote "origin", and setting the current branch to track the upstream branch. |
|
|
153
|
-
| gpcb | `git push origin "$(git branch|grep '\*'|tr -d '* \n')"` | Push current branch |
|
|
154
|
-
| gpo | `git push origin` | Push local changes to the online repository. |
|
|
155
|
-
| gpoll | `git push origin --all` | Push each of your local git branches to the remote repository |
|
|
156
|
-
| gpt | `git push --tags` | Push local tags. |
|
|
157
|
-
| gpull | `git pull` | Fetch from and integrate with another repository or a local branch. |
|
|
158
|
-
| gpullo | `git pull origin $(git current-branch)` | Do a pull for just one branch. |
|
|
159
|
-
| gpullm | `git pull origin master` | Pull changes from the locally stored branch origin/master and merge that to the local checked-out branch. |
|
|
160
|
-
| gpush | `git push` | Update remote refs along with associated objects. |
|
|
161
|
-
| gpusho | `git push origin $(git current-branch)` | Do a push for just one branch. |
|
|
162
|
-
| gpushr | `git remote | xargs -I% -n1 git push %` | git remotes-push - For each remote branch, push it. |
|
|
163
|
-
| gunpub | `git push origin :$(git current-branch)` | Un-publish the current branch by deleting the remote version of the current branch. |
|
|
164
|
-
|
|
165
|
-
### 2.1 Aliases to manage set of tracked repositories
|
|
166
|
-
|
|
167
|
-
| Alias | Command | Description |
|
|
168
|
-
| ------- | ---------------------------------------- | ------------------------------ |
|
|
169
|
-
| gr | `git remote` | Manage set of tracked repositories. |
|
|
170
|
-
| gra | `git remote add` | Add a remote named <name> for the repository at <url>. |
|
|
171
|
-
| grall | `git remote | xargs -L1 git push --all` | Push all branches to all remotes. |
|
|
172
|
-
| grallo | `git remote -v | grep "(fetch)" | sed -e 's#[[:blank:]].*##g' | grep -v "origin" | xargs -n 1 git remote rm` | Git remote all remotes except origin. |
|
|
173
|
-
| grao | `git remote add origin` | Add a new remote 'origin' if it doesn't exist. |
|
|
174
|
-
| grbk | `git reset --soft HEAD^` | Rollback to stage. |
|
|
175
|
-
| grcl | `git remote prune` | Deletes all stale remote-tracking branches under <name>. |
|
|
176
|
-
| grf | `find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "cd '{}' && echo '{}' && git config --get remote.origin.url" \;` | Show GIT Remote Origin for each immediate subfolder. |
|
|
177
|
-
| grfall | `git branch -r | awk -F'/' '{print "git fetch "$1,$2}' | xargs -I {} sh -c {}` | Fetch all git remotes for a repo. |
|
|
178
|
-
| gro | `open `git remote -v | awk '/fetch/{print $2}' | sed -Ee 's#(git@|git://)#http://#' -e 's@com:@com/@'`| head -n1` | Open current Git repository URL. |
|
|
179
|
-
| grp | `git remote | xargs -I% -n1 git push %` | For each remote branch, push it. |
|
|
180
|
-
| grpa | `for i in `git remote`; do git push $i; done;` | Push all remotes. |
|
|
181
|
-
| grprint | `git remote -v | sed -n '/github.com.*push/{s/^[^[:space:]]\+[[:space:]]\+//;s|git@github.com:|https://github.com/|;s/\.git.*//;p}` | Print the url for the current repo. |
|
|
182
|
-
| grs | `git show` | Gives some information about the remote <name>. |
|
|
183
|
-
| grso | `git remote show origin` | Display where the origin resides. |
|
|
184
|
-
| grv | `git remote -v` | Shows URLs of remote repositories when listing your current remote connections. |
|
|
185
|
-
| gru | `git remote update` | Fetch updates for a named set of remotes in the repository as defined by remotes. |
|
|
186
|
-
|
|
187
|
-
### 2.2 Aliases to revert some existing commits
|
|
188
|
-
|
|
189
|
-
| Alias | Command | Description |
|
|
190
|
-
| ------- | ---------------------------------------- | ------------------------------ |
|
|
191
|
-
| grev | `git revert` | Undo the changes from some existing commits. |
|
|
192
|
-
| grevnc | `git revert --no-commit` | Revert without autocommit; useful when you're reverting more than one commits' effect to your index in a row. |
|
|
193
|
-
|
|
194
|
-
### 2.3 Aliases to initialize, update or inspect submodules
|
|
195
|
-
|
|
196
|
-
| Alias | Command | Description |
|
|
197
|
-
| ------- | ---------------------------------------- | ------------------------------ |
|
|
198
|
-
| gsmi | `git submodule init` | Initialize the submodules recorded in the index. |
|
|
199
|
-
| gsma | `git submodule add` | 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". |
|
|
200
|
-
| gsm | `git submodule` | Enables foreign repositories to be embedded within a dedicated subdirectory of the source tree. |
|
|
201
|
-
| gsms | `git submodule sync` | Synchronizes submodules' remote URL configuration setting to the value specified in .gitmodules. |
|
|
202
|
-
| gsmu | `git submodule update` | 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. |
|
|
203
|
-
| gsmui | `git submodule update --init` | Submodule update with initialize. |
|
|
204
|
-
| gsmuir | `git submodule update --init --recursive` | Submodule update with initialize and recursive; this is useful to bring a submodule fully up to datec
|
|
205
|
-
|
|
206
|
-
### 2.4 Aliases to show the working tree status
|
|
207
|
-
|
|
208
|
-
| Alias | Command | Description |
|
|
209
|
-
| ------- | ---------------------------------------- | ------------------------------ |
|
|
210
|
-
| gst | `git status` | Show the working tree status. |
|
|
211
|
-
| gstrmu | `git status -su | cut -d' ' -f2- | tr '\n' '\0' | xargs -0 rm` | Remove untracked files in a git repository. |
|
|
212
|
-
| gsts | `git status --short` | Status with short format instead of full details. |
|
|
213
|
-
| gstsb | `git status --short --branch` | Status with short format and showing branch and tracking info. |
|
|
214
|
-
|
|
215
|
-
### 2.5 Aliases to create, list, delete or verify a tag object signed with GPG
|
|
216
|
-
|
|
217
|
-
| Alias | Command | Description |
|
|
218
|
-
| ------- | ---------------------------------------- | ------------------------------ |
|
|
219
|
-
| gt | `git tag` | gt: See all tags. |
|
|
220
|
-
| gta | `git tag -a $1 -m $2` | gta: Add a tag. |
|
|
221
|
-
| gtg | `git tag` | gtg: Create, list, delete or verify a tag object signed with GPG. |
|
|
222
|
-
| gtl | `git describe --tags --abbrev=0` | gtl: Last tag in the current branch. |
|
|
223
|
-
| gtrm | `for t in `git tag` do; git push origin :$t; git tag -d $t; done` | gtrm: Delete all tags. |
|
|
224
|
-
|
|
225
|
-
### 2.6 Aliases to show various types of objects
|
|
226
|
-
|
|
227
|
-
| Alias | Command | Description |
|
|
228
|
-
| ------- | ---------------------------------------- | ------------------------------ |
|
|
229
|
-
| gshab | `for k in ``git branch|perl -pe s/^..//``;do echo -e ``git show --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k|head -n 1``\\t$k;done|sort -r` | Show git branches by date - useful for showing active branches. |
|
|
230
|
-
| gshf | `git show-branch -a | grep '\*' | grep -v 'git rev-parse --abbrev-ref HEAD' | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//'` | Find the nearest parent branch of the current git branch. |
|
|
231
|
-
| gshls | `git show --relative --pretty=format:''` | Show list of files changed by commit. |
|
|
232
|
-
| gshnp | `git show --no-patch --pretty="tformat:%h (%s, %ad)" --date=short` | Given any git object, try to show it briefly. |
|
|
233
|
-
| gshwho | `git shortlog --summary --numbered --no-merges` | Show who contributed, in descending order by number of commits. |
|
|
234
|
-
|
|
235
|
-
### 2.7 Aliases to reset current HEAD to the specified state
|
|
236
|
-
|
|
237
|
-
| Alias | Command | Description |
|
|
238
|
-
| ------- | ---------------------------------------- | --------------------- |
|
|
239
|
-
| grescl | `git reset --hard HEAD~1 && git clean -fd` | Reset commit clean. |
|
|
240
|
-
| gresh | `git reset --hard HEAD~1` | Reset commit hard. |
|
|
241
|
-
| gresp | `git reset --hard && git clean -ffdx` | Reset pristine. |
|
|
242
|
-
| gress | `git reset --soft HEAD~1` | Reset commit. |
|
|
243
|
-
| gresu | `git reset --hard $(git upstream-branch)` | Reset to upstream. |
|
|
244
|
-
|
|
245
|
-
### 2.8 Aliases to pick out and massage parameters
|
|
246
|
-
|
|
247
|
-
| Alias | Command | Description |
|
|
248
|
-
| ------- | ---------------------------------------- | --------------------- |
|
|
249
|
-
| gtp | `git rev-parse --show-toplevel` | Get the top level directory name. |
|
|
250
|
-
| gcb | `git rev-parse --abbrev-ref HEAD` | Get the current branch name. |
|
|
251
|
-
| gub | `git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)` | Get the upstream branch name. |
|
|
252
|
-
|
|
253
|
-
### 2.9 Aliases to remove files from the working tree and from the index
|
|
254
|
-
|
|
255
|
-
| Alias | Command | Description |
|
|
256
|
-
| ------- | ---------------------------------------- | --------------------- |
|
|
257
|
-
| grm | `git rm` | Remove files from the working tree and from the index.
|
|
258
|
-
| grmc | `git rm --cached` | Unstage and remove paths only from the index.
|
|
259
|
-
| grmd | `git ls-files -z --deleted | xargs -0 git rm` | git remove files which have been deleted. |
|
|
260
|
-
| grmd2 | `git rm $(git ls-files --deleted)` | git remove files which have been deleted. |
|
|
261
|
-
| grmds | `find . -name .DS_Store -exec git rm --ignore-unmatch --cached {} +` | Remove .DS_Store from the repository. |
|
|
262
|
-
| grmn | `for file in $(git status | grep "new file" | sed "s/#\tnew file://"); do git rm --cached $file; done` | Remove all new files. |
|
|
263
|
-
| grmx | `git ls-files -z -d | xargs -0 git rm --` | Remove for all deleted files, including those with space/quote/unprintable characters in their filename/path. |
|
|
264
|
-
|
|
265
|
-
### 3.0 Aliases to show what revision and author last modified each line of a file
|
|
266
|
-
|
|
267
|
-
| Alias | Command | Description |
|
|
268
|
-
| ------- | ---------------------------------------- | --------------------- |
|
|
269
|
-
| gbl | `git blame --date short "$1"` | Specifies a format used to output short dates. |
|
|
270
|
-
| gblc | `git blame --line-porcelain "$1" | sed -n 's/^author //p' | sort | uniq -c | sort -rn` | Count the number of lines attributed to each author. |
|
|
271
|
-
| gblau | `git ls-files | xargs -n1 git blame --line-porcelain | sed -n 's/^author //p' | sort -f | uniq -ic | sort -nr` | Prints per-line contribution per author for a GIT repository. |
|
|
272
|
-
|
|
273
|
-
### 3.1 Aliases to get and set repository or global options
|
|
274
|
-
|
|
275
|
-
| Alias | Command | Description |
|
|
276
|
-
| ------- | ---------------------------------------- | --------------------- |
|
|
277
|
-
| gconfdiff | `git config alias.dcolor "diff --color-words"` | Better git diff, word delimited and colorized. |
|
|
278
|
-
| gconfl | `git config --list` | List all the settings. |
|
|
279
|
-
| gconfr | `git config --local --get remote.origin.url` | Output remote origin from within a local repository. |
|