3 ms·
i've been using jj for the past few weeks on a feature heavy project. my entire "workflow" is no more than these 4 commands, rinse and repeat: jj new main@
by thewisenerd 1y ago
i've been using jj for the past few weeks on a feature heavy project. my entire "workflow" is no more than these 4 commands, rinse and repeat:
jj new main@github
jj describe
jj git push -c {prefix}
jj git fetch
my couple thoughts:
- i'm forced to be "strict" with my changeset since there's no `git add -P`
- bookmarks are a pain to keep up-to-date with `jj new`, i don't know if i even want to do that. for multi-commit changes, i've defaulted to `jj new` a couple times as needed, and `git push -c` the latest.
- i'm sure some day i'll understand the `@..` and `roots()` incantations but for now the most complex thing i've successfully pulled off is `jj rebase -s 'roots(main@github..@)' -d main@github`
i don't think trying to map your current git flows 1-to-1 onto jj is going to be a very fruitful exercise.
- senekor 1y agoJust a few tips: > - i'm forced to be "strict" with my changeset since there's no `git add -P` Check out the command `jj split` and possibly `jj squash --interactive`. > - bookmarks are a pain to keep up-to-date with `jj new` There's a neat alias a lot of people use: ```toml [aliases] tug = ["bookmark", "move", "--from", "heads(::@- & bookmarks())", "--to", "@-"] ``` It finds the closest bookmark and moves it to `@-`. Pretty much exactly what you want when adding more commits on top of an existing branch.
- paradox460 1y ago> - i'm forced to be "strict" with my changeset since there's no `git add -P` JJ split is your friend > - bookmarks are a pain to keep up-to-date with `jj new`, i don't know if i even want to do that. for multi-commit changes, i've defaulted to `jj new` a couple times as needed, and `git push -c` the latest. Check out the common community alias JJ tug. It's used enough they're considering adding it as a feature
- epolanski 1y agoCan't you just add an alias that takes two arguments that takes a message and a bookmark name? I aliased the entire describe, commit, bookmark and push to a single command.