From e0ffcbc209821039f58b95bf25786fb9432d96d3 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Date: Tue, 28 Apr 2015 12:17:54 +0200 Subject: git: added the `fork` alias This alias provides an easy way to keep forks up-to-date. It assumes that the remote URL is named `upstream` and that it contains the original project. Therefore: $ git fork master It will fetch `upstream/master` and then merge it onto the `master` branch of the fork repo. --- gitconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gitconfig') diff --git a/gitconfig b/gitconfig index 418340e..cf4ae0d 100644 --- a/gitconfig +++ b/gitconfig @@ -11,8 +11,9 @@ autocorrect = 1 [alias] - down = pull --rebase --stat a = commit -a + down = pull --rebase --stat + fork = !git fetch upstream && git merge upstream/$1 [push] default = matching @@ -37,3 +38,5 @@ insteadOf = kde: [url "ssh://git@git.kde.org/"] pushInsteadOf = kde: +[url "git@git.kde.org:"] + pushInsteadOf = kde: -- cgit v1.2.3