Skip to content

Instantly share code, notes, and snippets.

@itvexesme
Last active December 23, 2023 07:51
Show Gist options
  • Save itvexesme/8f2f8b3d67a7d68d27de33d882f631f2 to your computer and use it in GitHub Desktop.
Save itvexesme/8f2f8b3d67a7d68d27de33d882f631f2 to your computer and use it in GitHub Desktop.
Gitlab auto-merge .gitlab-ci.yml
# /project/.gitattributes
.gitlab-ci.yml merge=ours
# /etc/gitlab/gitlab.rb
gitaly['configuration'] = {
# ...
git: {
# ...
config: [
# ...
{ key: "merge.ours.driver", value: "true" },
],
},
}
This gist will helps you to get rid of .gitlab-ci.yml conflicts during merges between branches with different ci config files.
# local git setup
user@localhost: git config --global merge.ours.driver true
# repo setup - see .gitattributes
# gitlab setup - see .gitlab.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment