Table of Contents

Jujutsu (VCS)


#vcs #git #dev

Tips and Tricks

Squash a range of commits

jj squash -f '<old>::<new>' -t <old>

Custom function alias

  jjsr() {
    jj squash -f "$1::$2" -t "$1"
  }
  jjsr <old> <new>

Find and abandon all empty, non-immutable commits

  # List and review via logs
  jj log -r '(empty() ~ merges() ~ root() ~ immutable())'

  # Abandon if happy
  jj abandon -r '(empty() ~ merges() ~ root() ~ immutable())'
↑ top