[PATCH v4] build: add default aliases
For now simply add a few common aliases.
co = checkout
ci = commit
rb = rebase
st = status
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
Documentation/git-checkout.txt | 5 +++++
Documentation/git-commit.txt | 5 +++++
Documentation/git-rebase.txt | 5 +++++
Documentation/git-status.txt | 5 +++++
config.c | 5 +++++
5 files changed, 25 insertions(+)
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index ca118ac..7597813 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -14,6 +14,11 @@ SYNOPSIS
'git checkout' [-f|--ours|--theirs|-m|--conflict=<style>] [<tree-ish>] [--] <paths>...
'git checkout' [-p|--patch] [<tree-ish>] [--] [<paths>...]
+ALIAS
+-----
+
+git co
+
DESCRIPTION
-----------
Updates files in the working tree to match the version in the index
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index 1a7616c..8705abc 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -15,6 +15,11 @@ SYNOPSIS
[--date=<date>] [--cleanup=<mode>] [--[no-]status]
[-i | -o] [-S[<keyid>]] [--] [<file>...]
+ALIAS
+-----
+
+git ci
+
DESCRIPTION
-----------
Stores the current contents of the index in a new commit along
diff --git a/Documentation/git-rebase.txt b/Documentation/git-rebase.txt
index 6b2e1c8..bb18fea 100644
--- a/Documentation/git-rebase.txt
+++ b/Documentation/git-rebase.txt
@@ -14,6 +14,11 @@ SYNOPSIS
--root [<branch>]
'git rebase' --continue | --skip | --abort | --edit-todo
+ALIAS
+-----
+
+git rb
+
DESCRIPTION
-----------
If <branch> is specified, 'git rebase' will perform an automatic
diff --git a/Documentation/git-status.txt b/Documentation/git-status.txt
index 9046df9..30ecd25 100644
--- a/Documentation/git-status.txt
+++ b/Documentation/git-status.txt
@@ -11,6 +11,11 @@ SYNOPSIS
[verse]
'git status' [<options>...] [--] [<pathspec>...]
+ALIAS
+-----
+
+git st
+
DESCRIPTION
-----------
Displays paths that have differences between the index file and the
diff --git a/config.c b/config.c
index e13a7b6..be724b2 100644
--- a/config.c
+++ b/config.c
@@ -1082,6 +1082,11 @@ int git_config_early(config_fn_t fn, void *data, const char *repo_config)
home_config_paths(&user_config, &xdg_config, "config");
+ ret += fn("alias.ci", "commit", data);
+ ret += fn("alias.co", "checkout", data);
+ ret += fn("alias.rb", "rebase", data);
+ ret += fn("alias.st", "status", data);
+
if (git_config_system() && !access_or_die(git_etc_gitconfig(), R_OK, 0)) {
ret += git_config_from_file(fn, git_etc_gitconfig(),
data);
--
1.8.4-fc