Git/aliases/ja

Git は多くの便利なオプションを持つ強力なツールです. コマンドとオプションの集合体に別名を作成できることをご存知ですか? もう長いシェルのワンライナーを書く必要はないでしょう. 下記は便利な別名を集めたものです.



別名をセットアップする方法
内に  節を追加します. 各行は の書式です.

Below is a snippet of the  section of a   file

すべて
一度にすべてを取得したい方のために、このページにあるすべての別名を以下に示します:

amend

 * 例 :

With Gerrit you may have to correct a patchset. This usually means editing files and then having to correct the previous commit message. The workflow would be something like:

$ git review -d 1234 // gerrit changeset id &lt;edit files> $ git add &lt;files> $ git commit --amend &lt;update commit-msg>

If you only changed files (not added new ones), the last two commands can be grouped by using.

br

 * 例 :

branch-cleanup
This deletes all branches-references that are fully merged into master (or some other branch, if you specify).

co

 * 例 :

ds

 * 例 :

A plain  shows the diff between the (unstaged) working copy and the staged working copy. In most cases this is the same as the diff between the working copy and the last committed revision of the current branch (HEAD).

However, if you have already done  and then made some more changes, then the changes at time of last   no longer show up in. Use  to create a diff between the already staged (but uncommitted) changes and the current HEAD.

di

 * 例 :

fetchall

 * 例 :



In this case, both  and   are the same, good enough for the above screenshot.

lg

 * 例 :  (default, with pager) or   (last 25 only)



log-me
The author name is case-sensitive.
 * 例 :



log-nice

 * 例 :



panic
Sometimes, you might have done something wrong in git. You think you've lost your commits, or something like that. Chances are, the information is still there--so the best course of action is to make an immediate backup, before you risk actually losing data.

st

 * 例 :

wdiff

 * 例 :