aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/kc60/keymaps/noroadsleft/readme_git.md
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/kc60/keymaps/noroadsleft/readme_git.md')
-rw-r--r--keyboards/kc60/keymaps/noroadsleft/readme_git.md11
1 files changed, 7 insertions, 4 deletions
diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_git.md b/keyboards/kc60/keymaps/noroadsleft/readme_git.md
index b81bb9409..432f1abc7 100644
--- a/keyboards/kc60/keymaps/noroadsleft/readme_git.md
+++ b/keyboards/kc60/keymaps/noroadsleft/readme_git.md
@@ -11,7 +11,8 @@
# Cherry Pick
cp = cherry-pick
- # Check out a Pull Request
+ # Check out a Pull Request locally
+ # e.g. `git cop 351` fetches the commits from Pull Request #351 and saves it to local branch 'pr/351'.
cop = "!f() { git fetch upstream pull/$1/head:pr/$1; git checkout pr/$1; }; f"
# Sync master branch
@@ -39,13 +40,17 @@
# Short-form status
st = "!git status --short --untracked-files=no"
+ stu = "!git ls-files --others -x '*/*'"
# Returns the name of the current branch
branch-name = "!git rev-parse --abbrev-ref HEAD"
bn = "!git branch-name" # short-form of the above
+ # List branches by the date of their last commit, newest to oldest
+ bbd = "for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(objectname) %(objecttype) %(refname:short) (%(authordate))'"
# Compare commit counts between current branch and QMK master
- cc = "!f() { git fetch upstream; echo \"$(git branch-name) vs. upstream/master\"; git rev-list --left-right --count $(git branch-name)...upstream/master; }; f"
+ # e.g. `git cc dev_branch upstream/master` returns how many commits are on `dev_branch` and not on `upstream/master`, and vice versa.
+ cc = "!f() { git fetch upstream; echo \"$(git branch-name) vs. $2\"; git rev-list --left-right --count $1...$2; }; f"
# Push to origin repo
po = "push origin $(git branch-name)"
@@ -71,6 +76,4 @@
# Force push without overwriting established history
pushf = push --force-with-lease
-
-
```