@staticmethod
    def createattributes():
        """
        create a .gitattributes file (if so specified and not yet present)
        """
        config = configuration.get()
        if len(config.gitattributes) > 0:
            newline = os.linesep
            gitattribues = ".gitattributes"
            if not os.path.exists(gitattribues):
                with open(gitattribues, "w") as attributes:
                    for line in config.gitattributes:
                        attributes.write(line + newline)
                shell.execute("git add " + gitattribues)
                shell.execute("git commit -m %s -q" % shell.quote("Add .gitattributes"))
dataset/ETHPy150Open rtcTo/rtc2git/gitFunctions.py/Initializer.createattributes/original