Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

I restored the dotfiles with Time Machine but they changed the type from document to unix file. Why?

Hello. I recently received an update to OneDrive that removed all my files from my computer. OneDrive has changed its file storage algorithms and it no longer suits me. It is very sad. I decided to restore my files, namely projects, through the Time Machine. I restored the OneDrive folder but dotfiles like .gitigore .buckconfig etc. changed their type from document to unix executable file. Why did this happen? It turns out that my files are damaged and different from what they were? Because if I create a new .gitigore file it will be like a document. This is problem?

MacBook Pro 16″, macOS 12.1

Posted on Jan 26, 2022 8:25 AM

Reply
12 replies

Jan 26, 2022 9:53 AM in response to etresoft

etresoft wrote:

Those document types may not have any real meaning. What is the content of your .gitignore file?

Here's how it works. A .gitignore file is a plain text file where each line contains a pattern for files/directories to ignore. Generally, this is placed in the root folder of the repository, and that's what I recommend. However, you can put it in any folder in the repository and you can also have multiple .gitignore files. The patterns in the files are relative to the location of that .gitignore file.


Overview:

Introduction

When you make commits in a git repository, you choose which files to stage and commit by using git add FILENAME and then git commit. But what if there are some files that you never want to commit? It's too easy to accidentally commit them (especially if you use git add . to stage all files in the current directory). That's where a .gitignore file comes in handy. It lets Git know that it should ignore certain files and not track them.


From:

https://www.pluralsight.com/guides/how-to-use-gitignore-file

Jan 26, 2022 10:32 AM in response to WEBMAS

The Terminal and the Finder environment are two separate things. Usually, it is the file extension that determines how a file will appear in the Finder. The command-line environment in the Terminal doesn't care about files extensions. Technically speaking, a file with a dot consists only of a file extension and this can result in unpredictable results in the Finder. Normally, such files are hidden altogether.


There are some hidden attributes that may explain why these files look the way they do. You can use the xattr and/or "ls -al@" tools to inspect them.

I restored the dotfiles with Time Machine but they changed the type from document to unix file. Why?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.