summaryrefslogtreecommitdiffstats
path: root/.bin
diff options
context:
space:
mode:
authorTyler Davis <tydavis@gmail.com>2020-03-20 23:24:10 +0000
committerTyler Davis <tydavis@gmail.com>2020-03-20 23:24:10 +0000
commit10e18e2464bb632339299e74f56838c883c3eb0f (patch)
tree8a2e5d2d58f40d087c495e0cf2dbe76f34470c62 /.bin
parenta5bec1f0a486875579fcc56af65452b503c8a3eb (diff)
downloaddotfiles-10e18e2464bb632339299e74f56838c883c3eb0f.tar.gz
dotfiles-10e18e2464bb632339299e74f56838c883c3eb0f.zip
feat(git): add fetchgit
Diffstat (limited to '.bin')
-rwxr-xr-x.bin/fetchgit11
1 files changed, 11 insertions, 0 deletions
diff --git a/.bin/fetchgit b/.bin/fetchgit
new file mode 100755
index 0000000..d94beb3
--- /dev/null
+++ b/.bin/fetchgit
@@ -0,0 +1,11 @@
+#!/usr/bin/env zsh
+
+git fetch --all --prune;
+
+if git config remote.upstream.url > /dev/null; then
+ git pull --ff-only upstream master;
+ git push origin;
+else
+ git pull --ff-only origin master;
+fi
+