From 3c50c9f0afa4ca4ad28b565b952583718af18218 Mon Sep 17 00:00:00 2001 From: Michael Stepner Date: Wed, 14 Jun 2023 23:47:24 -0500 Subject: [PATCH] Update Stata.gitignore to ignore new auto backup files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stata 18 introduced an auto-backup feature which creates a temporary file while a code file is open it its IDE. These auto-backup files are analogous to the [Microsoft Office backup files that are gitignored](https://github.com/github/gitignore/blob/main/Global/MicrosoftOffice.gitignore). [Ref](https://www.stata.com/manuals/gsm13.pdf): > The Do-file Editor now creates a backup file whenever it opens a document or creates a new one. > When an existing document is opened, Stata creates a backup file of a document that is saved to disk > in the same directory using the existing document’s filename prefixed with ~ and with the extension > .stswp. When you edit a new and unsaved document, it saves the backup file to the temp directory. > When a document is closed, the backup file is deleted. However, if Stata does not exit cleanly because > of a power outage or a computer crash, the backup file is left behind. --- Global/Stata.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/Global/Stata.gitignore b/Global/Stata.gitignore index 07997bb1..288abf8a 100644 --- a/Global/Stata.gitignore +++ b/Global/Stata.gitignore @@ -8,6 +8,7 @@ *.smcl *.stpr *.stsem +~*.stswp # Graphic export files from Stata # Stata command graph export: http://www.stata.com/manuals14/g-2graphexport.pdf