getsolus / help-center-docs

Solus's Help Center documentation as well as previous User Guide.
https://help.getsol.us
GNU General Public License v2.0
57 stars 83 forks source link

Additions to git tips & tricks - a few small additions #572

Open TraceyC77 opened 1 month ago

TraceyC77 commented 1 month ago

Do a quick lint smoketest in a worktree

    git add . && git commit -m "temp" && go-task check

If that looks good, do a:

    git reset --hard HEAD^

To undo the "temp" commit above and do regular commits (one per package).

Git pull that preserves existing work

to pull in changes from main while preserving existing work

git pull origin main --rebase --autostash

Get logs only for the current packaging directory

git log .

Add -p to see the patches (changes).

Maintenance

Git has automatic maintenance, enabled using:

gotosoluspkgs
git maintenance start

Read the maintenance docs for more information.

How to use git format-patch

If you use git format-patch with the arguments --zero-commit and --no-signature it'll zero out the commit hash and strip the git version from the bottom.

This can help reduce the diff from updating patches in the future a bit.