Wieder was gelernt

git archive

2022-09-02 (Friday)
Tags: git

To extract the current directory into a tar with a prefix: git archive $tag –prefix $prefix/ . | gzip > $packagename.tar.gz I think $prefix and $packagename will often be identical. $prefix will often include at leart part of $tag. Examples: git archive agestat-2022.09.02 --prefix agestat-2022.09.02/ . | gzip > agestat-2022.09.02.tar.gz git archive release-2.9 --prefix theprogram-2.9/ . | gzip > theprogram-2.9.tar.gz

Git core.autocrlf, text=auto and --renormalize

2022-05-07 (Saturday)
Tags: git autocrlf renormalize gitattributes

Git will normalize line endigs for files which are added to the index if core.autocrlf is set to true or input (use text=auto in .gitattributes to autodetect text files). However, it won’t do this for files which already exist in the repo. For those it remembers (where?) how they were treated when they were first added. So after changing .gitattributes you have to invoke git add --renormalize . to re-inspect all tracked files and normalize them if necessary.

git grep

2021-06-16 (Wednesday)
Tags: git

git grep $PATTERN $(git rev-list --all)

Git Based Project Management Tools

2020-10-07 (Wednesday)
Tags: git programming project management workflow review bitbucket gitlab gitea

Bitbucket The Image comparison tool is very nice. You can view old and new images side by side, merged (whole image by percentage or with slider) and pixel differences. The price structure is a trap. 10 users are very cheap (USD 10 pa?) and starting with the 11th user it gets expensive (USD 1800 pa?). Still not very expensive, but the jump is huge. Can invite multiple reviewers. Flexible work flow

Reset Master in Bitbucket

2020-09-22 (Tuesday)
Tags: git bitbucket

Assumption: The last few commits on master were erroneous and should be discarded. Create a fresh clone of the repo Create a new branch at the last good commit: git co 123456 git co -b new_master Rename old master: git branch -m master old_master Push to repo: git push --all In Bitbucket, change the default branch in Settings -> Repository details Now the master branch can be deleted. (If there are still pull requests targeting master, you will get an error message: Edit those PRs and redirect them to new_master)

All My Repos

2020-09-15 (Tuesday)
Tags: git

My Gitea 2d awd bayes chsh-firewall-intern dot etc-chsh-fw-int finddup gunicorn-multi hello hilbert install-python iptables-save-clean linkchecker luga-2018 Net-Http-Useragent pgcollate picture-tournament pix postgres-monitor progrunner rosetta rpn simple (dup at github) smart2wds switchinglogfilehandlers timeseries update-bloat xfce-xterm-launcher-update yama Github SmartAngular apache2-multi bench birthday-paradox blob-bench cronwrapper csv2pg dbbench dedupgz dot eratosthenes fair-die-2 fair-die hilbertfox keepfree libzmq linenoise mos pingpong qpsmtpd simple (dup at hjp) table vim.js wds-datapanel xssd xtermsetcolumns zdot WSR Bitbucket FIW/fiw-wds (-> Gitea) HUGO/wsr2020 (obsolet) HUGO/wsr_logo_theme (-> Gitea) IN/ams-daten-import IN/prioritize_episodes MAIL/mailchimp MAIL/wifo-aktuell-subscribe MAIL/wifo-unsubscribe NET/excelgenerator OMT/outputmeldetool PLAYG/69ainfo PLAYG/masterchangetest PLAYG/playground TESSY/susystammdatenimporter (-> Gitea) TESSY/tessy (-> Gitea) TESSY/tessy_auswertungen (-> Gitea) TESSY/tessy_extern (-> Gitea) TESSY/tessy_gui_a6 (-> Gitea) TESSY/tessy_gui_legacy (obsolet) TESSY/tessynabumirrorservice (-> Gitea) TESSY/tessy_selenium (obsolet?

Shallow Git Repos Considered Harmful

2020-05-15 (Friday)
Tags: git best practice

Shallow Git Repos sind keine gute Idee. Da gibt es zu viele Einschränkungen, die ich nicht verstehe. Z.B. bin ich gerade daran gescheitert, einen neuen Branch aus dem Origin-Repo zu übernehmen.