Skip to content

Commit

Permalink
Add .gitattributes file to ignore merge conflicts
Browse files Browse the repository at this point in the history
Ignore conflicts with specific files in the /dependabot path.

The development branch tracks a different version of Go; prevent
merging conflicts to these specific files.
  • Loading branch information
atc0005 committed Jul 25, 2023
1 parent 047c46d commit bacfcaa
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# See LICENSE file in this repo for license details.

# https://medium.com/@porteneuve/how-to-make-git-preserve-specific-files-while-merging-18c92343826b
# https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes#Merge-Strategies

# The development branch tracks a different version of Go; prevent merging
# conflicts to these specific files.
#
# NOTE: You still need to configure a 'ours' merge strategy in order to have
# these settings take effect.
#
# Per repo:
#
# $ cd /path/to/repo
# $ git config merge.ours.driver true
#
# Globally:
#
# $ git config --global merge.ours.driver true

dependabot/docker/builds/Dockerfile merge=ours
dependabot/docker/go/Dockerfile merge=ours

0 comments on commit bacfcaa

Please sign in to comment.