@@ -30,6 +30,7 @@ Jump to what you're most interested in:
3030 * [ Cleaning up your own history] ( #cleaning-up-your-own-history )
3131 * [ Better feature branches] ( #better-feature-branches )
3232 * [ Smartlog] ( #smartlog )
33+ * [ Sync work across workstations] ( #sync-work-across-workstations )
3334 * [ Pulling in suggestions from the web] ( #pulling-in-suggestions-from-the-web )
3435 * [ And more!] ( #and-more )
3536* [ Installation] ( #installation )
@@ -50,8 +51,10 @@ doesn't work. Git will tell you the branch isn't fully merged. You can, of
5051course ` git branch -D <branch> ` , but that does no safety checks at all, it
5152forces the deletion.
5253
53- Enter ` sj bclean ` - it determines if the contents of your branch has been merge
54- and safely deletes if so.
54+ Enter ` sj lbclean ` - it determines if the contents of your branch has been merge
55+ and safely deletes if so. (Note: ` lbclean ` stands for "local branch clean", and
56+ is aliased to ` bclean ` for both backwards-compatibility and also since it's the
57+ most common branch-cleanup command).
5558
5659![ bclean screenshot] ( https://github.com/jaymzh/sugarjar/blob/main/images/bclean.png )
5760
@@ -65,6 +68,17 @@ been merged:
6568
6669![ bcleanall screenshot] ( https://github.com/jaymzh/sugarjar/blob/main/images/bcleanall.png )
6770
71+ There is also ` sj rbclean ` ("remote branch clean") (and ` sj rbcleanall ` ) for
72+ cleanup of remote branches. * Note* : This cannot differentiate between
73+ PR/feature branches which have been merged and long-lived release branches that
74+ have been merged (e.g. if '2.0-release' is a branch and has no commits not in
75+ main, it will be deleted).
76+
77+ There is even ` sj gbclean ` ("global branch clean") (and ` sj gbcleanall ` ) which will
78+ do both the local and remote cleaning.
79+
80+ * NOTE* : Remote branch cleaning is still experimental, use with caution!
81+
6882### Smarter clones and remotes
6983
7084There's a pattern to every new repo we want to contribute to. First we fork,
@@ -275,6 +289,21 @@ smartlog` or `sj sl` for short.
275289
276290![ smartlog screenshot] ( https://github.com/jaymzh/sugarjar/blob/main/images/smartlog.png )
277291
292+ ### Sync work across workstations
293+
294+ If you work on multiple workstations, keeping your branches in-sync can be a
295+ pain. SugarJar provides ` sync ` to help with this.
296+
297+ For example, if you do some work on feature ` foo ` on machine1 and push to
298+ ` origin/foo ` (intending to eventually merge to ` upstream/main ` ), then on
299+ machine2, you pull that branch, do more work, which you also push to
300+ ` origin/foo ` , then on machine1, you can do ` sj sync ` to pull down the changes
301+ from ` origin/foo ` . If you have local changes, that are not already on
302+ ` origin/foo ` , those will be rebased on top of the changes from ` origin/foo ` .
303+
304+ It's very similar to ` sj up ` , but instead of rebasing on top of the tracking
305+ branch, it rebases on top of the push target branch.
306+
278307### Pulling in suggestions from the web
279308
280309When someone 'suggests' a change in the GitHub WebUI, once you choose to commit
0 commit comments