version control

solveMC.sh
git fetch all
git checkout BRANCHNAME
git pull origin BRANCHNAME
git merge origin/develop
# Solve the merge conflict. 
# The commit message gets generated. 
git commit
git push origin/BRANCHNAME

Lets do a step by step view of this:

Lets say we want to take our branch with the name feature/my_branch and merge origin/develop branch into it. This is common practice to make sure to always start to work with an up to date branch. 
The first step should be to do a git fetch all. It will gather the changes for all branches that are within the repository and your local system of the current project you are in.

Then make sure you are on the branch you want with git switch feature/my_branch or if you don't have a local version yet get it from the repository with git checkout feature/my_branch.

Then get all the changes previously gathered with the git fetch all command with git pull. So now our branch that we are on should be on the most recent state for itself.

Now to get to the part where we want the recent changes of the develop branch into our branch.

git merge origin/develop will try to merge all the changes that happened on origin/develop into the branch you are currently on. Lets say you and develop both worked on the same file. Which is a common thing with the composer.lock or composer.json. You will have to solve the merge conflict by hand, step by step. Here is an example for an merge conflict:

merge_conflict_example.json
{
  "name": "example/project",
  "require": {
<<<<<<< HEAD
    "drupal/core": "^9.4",
    "drupal/devel": "^4.1"
=======
    "drupal/core": "^9.5",
    "drupal/admin_toolbar": "^3.0"
>>>>>>> feature/my_branch
  }
}

As you can see within the code, we updated Drupal core and add the new module admin_toolbar. It's important to not just use your own changes, you need to check if it is the right choice indeed. To proceed you need to delete the lines that mark the changes and keep the code you want.

solved_merge_conflict.json
{
  "name": "example/project",
  "require": {
    "drupal/core": "^9.5",
    "drupal/admin_toolbar": "^3.0"
    "drupal/devel": "^4.1"
  }
}

So if we solved the merge conflict like in the code above we want to commit the changes. In this case you don't need to create your own message for this commit, since we are in the process of a merge we can use simply git commit and a pre-generated commit message will be shown. Depending on your IDE you save the message and then can do the last step with

git push origin/feature/my_branch

That concludes how to commit and push a change the right way!
 

calc-release.sh
#!/bin/bash

latest=$(git tag -l | sort -V | tail -n1)
semver_parts=(${latest//./ })
major=${semver_parts[0]}
minor=${semver_parts[1]}
patch=${semver_parts[2]}

patch_version=${major}.${minor}.$((patch+1))
minor_version=${major}.$((minor+1)).0
major_version=$((major+1)).0.0

echo "latest:        $latest"
echo "patch release: $patch_version"
echo "minor release: $minor_version"
echo "major release: $major_version"
13.11.2025 | Marc Hitscherich

Calculate next suitable version tag from git