Last active
December 23, 2023 07:51
-
-
Save itvexesme/8f2f8b3d67a7d68d27de33d882f631f2 to your computer and use it in GitHub Desktop.
Gitlab auto-merge .gitlab-ci.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /project/.gitattributes | |
.gitlab-ci.yml merge=ours |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/gitlab/gitlab.rb | |
gitaly['configuration'] = { | |
# ... | |
git: { | |
# ... | |
config: [ | |
# ... | |
{ key: "merge.ours.driver", value: "true" }, | |
], | |
}, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment