浏览代码

bin: add git-fork

Thomas Dy 3 月之前
父节点
当前提交
26fe367499
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      .local/bin/git-fork

+ 8 - 0
.local/bin/git-fork

@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+repo_name=$(basename "$(git remote get-url origin)")
+
+git remote rename origin upstream
+git remote add origin "git@github.com:thatsmydoing/$repo_name"