简体   繁体   中英

How can I put a Mac OS X .app under version control as one file?

I am quite new to Git; I use SourceTree on Mac OS X.

When I start tracking an .app file, Git treats it as multiple files inside the .app content.

Is there any way to make another Git client only get that .app file as an application package rather than as multiple files?

These .app things are not files; they're directories . To convince yourself of this, try running

ls -la /Applications/

and note the d at the beginning of the permission flags corresponding to *.app entries:

...
drwxr-xr-x+  3 root          wheel    102 31 Jan 16:32 App Store.app
drwxr-xr-x+  3 root          wheel    102 31 Jan 16:32 Automator.app
drwxr-xr-x+  3 root          wheel    102 31 Jan 16:32 Calculator.app
drwxr-xr-x+  3 root          wheel    102 31 Jan 16:32 Calendar.app
drwxr-xr-x+  3 root          wheel    102 31 Jan 16:32 Chess.app
drwxr-xr-x+  3 root          wheel    102 31 Jan 16:32 Contacts.app
...

As long as Unix sees those as directories, so will Git. If you want Git to treat a *.app as a single file, you'll have to archive its contents in some fashion or another.

.app .framework .bundle .pages and more, everyone of these is application package, a directory/folder in your disk.

Either svn or git seen that as directory, because they should support windows/linux. Maybe some git client would shown application package as a "file", but I think shown as directory is better.

Another way store .app as a file is zip it and upload to git, it would be clean.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM