aboutsummaryrefslogtreecommitdiff
path: root/gitconfig
diff options
context:
space:
mode:
authorMiquel Sabaté <mikisabate@gmail.com>2015-04-28 12:17:54 +0200
committerMiquel Sabaté <mikisabate@gmail.com>2015-04-28 12:17:54 +0200
commite0ffcbc209821039f58b95bf25786fb9432d96d3 (patch)
tree653e43b8e29cc88b62499fab4e5456d51d8c5a94 /gitconfig
parent1f062c1564080510cec7e2ed1785bc47645652fc (diff)
downloaddotfiles-e0ffcbc209821039f58b95bf25786fb9432d96d3.tar.gz
dotfiles-e0ffcbc209821039f58b95bf25786fb9432d96d3.zip
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.
Diffstat (limited to 'gitconfig')
-rw-r--r--gitconfig5
1 files changed, 4 insertions, 1 deletions
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: