[{"content":"","date":null,"permalink":"https://cyberzed.dk/tags/git/","section":"Tags","summary":"","title":"Git"},{"content":"It\u0026rsquo;s no surprise that all software is evolving, even git is evolving these days which I guess relates to having become a very broad used tool.\nSome of my older aliases is leveraging checkout but these days it\u0026rsquo;s all about switch \u0026#x1f604;\nIn my old post git-alias-and-then-some I had the follwoing list:\nst = status -s aa = add -A cm = commit -m ups = commit -a --amend co = checkout cob = checkout -b dh = diff HEAD wdiff = diff -w --word-diff=color --ignore-space-at-eol ls = log --pretty=slog --decorate --date=relative ll = log --pretty=slog --decorate --date=relative --numstat fl = log -u start = !git init \u0026amp;\u0026amp; git commit --allow-empty -m \\\u0026#34;Initial commit\\\u0026#34; That can easily be updated a bit to the following:\nst = status -s aa = add -A cm = commit -m ups = commit -a --amend sw = switch sn = switch -c sm = switch main dh = diff HEAD wdiff = diff -w --word-diff=color ls = log --pretty=slog --decorate --date=relative ll = log --pretty=slog --decorate --date=relative --numstat fl = log -u start = !git init \u0026amp;\u0026amp; git commit --allow-empty -m \\\u0026#34;Initial commit\\\u0026#34; A fast and easy conversion that does the same thing. I could easily have retained my old alias, but I think I\u0026rsquo;ll survive learning the new alias and relate it to the underlying method.\n","date":"2026-05-12","permalink":"https://cyberzed.dk/blog/modernized-git-alias/","section":"Blog","summary":"","title":"Modernized Git Alias"},{"content":"","date":null,"permalink":"https://cyberzed.dk/tags/","section":"Tags","summary":"","title":"Tags"},{"content":"Looking back at my old very single post about git aliases made me realize that I have changed quite a few bits since then. It\u0026rsquo;s not just the aliases anymore, it\u0026rsquo;s more about my full git configuration.\nGeneral configurations #First of a few neat tips and tricks that are just convenient in your day to day life, depending on your taste of course.\nInstead of getting long lists git is able to show output in columns which I personally prefer\n[column] ui = auto I\u0026rsquo;m not sure who actually prefers their branches listed alphabetically, I sure don\u0026rsquo;t. Instead use this config to show the most recently updated branches first\n[branch] sort = -committerdate Switch to getting your tags sorted by natural sort instead of plain alphabetical, just way easier to find what you are looking for and not missing a number in alpha sort.\n[tag] sort = version:refname I like doing quick diffs in my terminal, hence I want the output a bit different than the default meyers algorithm, hence I\u0026rsquo;ve switched to using histogram as it performs way better when moving blocks and actually producing readable diffs. Speaking of moved sections of code I prefer my diff to use a different coloring for the moved sections hence the colorMoved setting.\n[diff] algorithm = histogram colorMoved = plain mnemonicPrefix = true It can feel kind of lazy or for some it might even say the next settings are reckless, but I am a strong proponent of having a as clean git repo as possible locally. All my fetches should prune branches and tags that no longer exist on my remote. The all it is really for my rare occurrences of open source work with a multiple remotes.\n[fetch] prune = true pruneTags = true all = true Ever find yourself needed a rebase in the middle of your work that you don\u0026rsquo;t really want to commit yet? With the autoStash setting git will automatically stash your changes, de a rebase and then pop your changes. Though it can bite you with some very awkward and complex conflicts I find it highly useful\u0026hellip;aka I haven\u0026rsquo;t had the conflicts hit me, yet.\n[rebase] autoStash = true updateRefs = true If you are a rebaser kindda of person like me, then you might wanna set rebase to true, so you can actually avoid defining --rebase on every pull.\n[pull] rebase = true With the many ways you can twist the arm of git I tend to run with a central workflow, hence my default push strategy fits quite well with the upstream setting. The autoSetupRemote is just a nice to have so that when I create a new branch and push it for the first time it automatically sets the remote tracking branch.\n[push] default = upstream autoSetupRemote = true followTags = true Formatting #This bit is probably the section that have eaten most brain cells for me. Spending the first 20 years of my career in a pure Windows environment, though with some PowerShell in the later years, I am soooo not used to these terminal colors and stuff. After tweaking and twisting it over the years I have finally landed on the format that fits my eyes the best. The neat thing you can do is define different pretty formats and then later use them as aliases.\n[pretty] slog = format:%C(auto)%h %C(magenta)%ad %C(auto)%d%C(auto) %s %C(green)[%cn] Aliases #Last but not least the updated collection of my git aliases. Some were in the old post, but some are new. The most interesting ones are those that leverage the previously defined pretty formats. Well not to forget my lovely alias for ammend, it is usually due to forgetting a file or two, so why not use ups as the short alias.\nst = status -s aa = add -A cm = commit -m ups = commit -a --amend co = checkout cob = checkout -b dh = diff HEAD wdiff = diff -w --word-diff=color --ignore-space-at-eol ls = log --pretty=slog --decorate --date=relative ll = log --pretty=slog --decorate --date=relative --numstat fl = log -u start = !git init \u0026amp;\u0026amp; git commit --allow-empty -m \\\u0026#34;Initial commit\\\u0026#34; ","date":"2025-12-18","permalink":"https://cyberzed.dk/blog/git-alias-and-then-some/","section":"Blog","summary":"","title":"Git alias and then some"},{"content":"Upcoming #2026 #NDC Oslo (Oslo, Norway) #Platform Engineering Beyond the Tools: Lessons Learned Across Industries\nHistory #2025 #Aarhus DevOps Meetup (Aarhus, Denmark) #The DevOps Retrospective and the Road Ahead - Slides\nCloud Native Denmark (Aarhus, Denmark) #Platform Engineering Beyond the Tools: Lessons Learned Across Industries - Slides\n2016 #ANUG (Aarhus, Denmark) #Something about security\nOslo Mobile Meetup (Oslo, Norway) #Tales from the Crypt\nNDC Oslo (Oslo, Norway) #Internet of things\u0026hellip;a road to success or absolute failure\nPubConf (Oslo, Norway) #IoT is misspelled IOU\nOredev (Malmö, Sweden) #Battlefield: Security\n2015 #Techorama (Mechelen, Belgium) #Internet of things\u0026hellip;a road to success or absolute failure\nOredev (Malmö, Sweden) #Internet of things\u0026hellip;a road to success or absolute failure - Slides - Video\nInternetWeek Denmark - Local Rockstars (Aarhus, Denmark) #Conventions: the double edge sword you should be wielding - Slides\n2014 #BuildStuffLt (Vilnius, Lithuania) #Blink(1)ing your way to USB - Slides\nOSS creates heroes\u0026hellip;you can be next!!! - Slides\n2013 #AANUG Developer Conference (Aalborg, Denmark) #Take-off with RavenDB\nScanDev (Gothenburg, Sweden) #Digging deeper into ServiceStack - Slides\nWarm Crocodile Developer Conference (Copenhagen, Denmark) #ServiceStack ALL THE THINGS!!! - Slides\nEmbracing OSS in the enterprise - Slides\n2012 #NDC (Oslo, Norway) #No more magical webservices feat. ServiceStack - Video\n","date":"2025-10-09","permalink":"https://cyberzed.dk/speaker/","section":"cyberzeddk","summary":"","title":"public speaking"},{"content":"Over the years I have been collecting the aliases that makes sense for me, and by that I really mean makes sense for me :) I might have lost a few recently when I had to reinstall my laptop after a complete crash, but below you will find those I have recovered and remember to have been using quite a bunch.\nCommon actions # st - status -s dh - diff HEAD aa - add -A cm - commit -m ups - commit -a --amend Branches # co - checkout cob - checkout -b pur = pull --rebase origin Log #This part is mostly different views on logs, honestly I\u0026rsquo;m not sure it would make sense for anyone but me. Use it for inspiration and go modify it to fit your needs. Tharrr be no silverbullets here neither.\nls = log --pretty=format:\u0026#34;%C(yellow)%h %ad%Cred%d %Creset%s%Cgreen [%cn]\u0026#34; --decorate --date=relative ll = log --pretty=format:\u0026#34;%C(yellow)%h %ad%Cred%d %Creset%s%Cgreen [%cn]\u0026#34; --decorate --date=relative --numstat fl = log -u ","date":"2021-05-06","permalink":"https://cyberzed.dk/blog/common-git-alias/","section":"Blog","summary":"","title":"Common Git Alias"},{"content":"As a kid I never thought I should be working in the IT industry, mostly because it wasn\u0026rsquo;t that big back in the 80\u0026rsquo;s. The dream of dreams was becoming a biologist with a speciality in the oceans\u0026hellip;what a contrast to a grand dad that was a fisher.\nWhen years pass you end up in new locations and I guess I followed my friends into the IT industry, and honestly the only thing I regret is the lack of fresh air and keeping your body in action.\n","date":"2021-05-06","permalink":"https://cyberzed.dk/about/","section":"cyberzeddk","summary":"","title":"about"},{"content":"","date":null,"permalink":"https://cyberzed.dk/author/","section":"Author","summary":"","title":"Author"},{"content":"","date":null,"permalink":"https://cyberzed.dk/blog/","section":"Blog","summary":"","title":"Blog"},{"content":"","date":null,"permalink":"https://cyberzed.dk/categories/","section":"Categories","summary":"","title":"Categories"},{"content":"Welcome to cyberzeddk — thoughts on DevOps, platform engineering, and whatever else crosses my desk.\n","date":null,"permalink":"https://cyberzed.dk/","section":"cyberzeddk","summary":"","title":"cyberzeddk"},{"content":"","date":null,"permalink":"https://cyberzed.dk/series/","section":"Series","summary":"","title":"Series"}]