Tag: Git


23 March 2022 / Jens Grassel / Software

It is nice if your CI/CD pipeline does also check for code format compliance but sometimes you may want to have feedback earlier or even prevent unformatted code to enter the repository.

In such a case the git DVCS offers hooks to the rescue. You can either dive into their documentation or simply use the script provided below. ;-)

10 July 2020 / Jens Grassel / Software

Sometime you need or want to move a commit or several of them between different git branches. One possible scenario would involve a created feature branch which runs a bit longer and multiple important fixes have been made on it. Some might argue that this shouldn’t happen but guess what: this happens all the time. ;-)

02 March 2020 / Jens Grassel / Software
17 July 2018 / Jens Grassel / Software

Because there are way to many options for git to remember it is feasible to have a template file for the .gitconfig which is usually located in the home directory.

03 June 2016 / Jens Grassel / Software
15 September 2014 / Jens Grassel / Software
03 September 2014 / Jens Grassel / Software

A simple shell script that jumps into a given directory (or a default one) and updates all git repos in there. Additionally it checks if an upstream remote exists. If that is the case it fetches the upstream changes.

10 February 2014 / Jens Grassel / Software
05 June 2013 / Jens Grassel / Software

If you want to mirror a svn repository via git there is a nice little gem called svn2git available that provides easy setup. Updating your repository is done via svn2git --rebase.

05 March 2013 / Jens Grassel / Software
08 June 2012 / Jens Grassel / Software

Sometimes you’ll want or have to split a git repository into two. This is usually a sign of not thinking forward enough but hey sh.. happens. If your repository is structured in a way that you just need a subdirectory of it into a new repository you can follow the steps below.