{"id":39040,"date":"2023-04-12T16:27:50","date_gmt":"2023-04-12T20:27:50","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=39040"},"modified":"2023-04-13T08:25:22","modified_gmt":"2023-04-13T12:25:22","slug":"xcode-files-with-source-control-status","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2023\/04\/12\/xcode-files-with-source-control-status\/","title":{"rendered":"Xcode Files With Source-Control Status"},"content":{"rendered":"<p><a href=\"https:\/\/www.jessesquires.com\/blog\/2023\/03\/22\/xcode-tip-filter-modified-files\/\">Jesse Squires<\/a>:<\/p>\n<blockquote cite=\"https:\/\/www.jessesquires.com\/blog\/2023\/03\/22\/xcode-tip-filter-modified-files\/\"><p>I usually use <a href=\"https:\/\/www.git-tower.com\/mac\">Git Tower<\/a> to review and commit my changes, but you can&rsquo;t edit files in Git Tower, which means switching back-and-forth between Xcode if you need to make additional modifications. Xcode provides a nice commit interface that allows editing, but it isn&rsquo;t always easy to use for editing &mdash; the side-by-side view forces lines to wrap and sometimes scrolling is wonky. File selection in this view is often glitchy, too.<\/p><p>[&#8230;]<\/p><p>Instead of trying to use Git Tower or Xcode&rsquo;s commit UI, you can filter the files in the sidebar to show only ones that have been modified! It&rsquo;s a very subtle button in the bottom right corner with a <code>+\/-<\/code> icon. Click that and Xcode will hide all the files you haven&rsquo;t touched. I&rsquo;ve found this to be helpful for focusing specifically on the changes I&rsquo;m making and removing all the clutter in large projects.<\/p><\/blockquote>\n<p>Xcode has had this feature for a while, but I only started using it recently after Apple fixed the bug where enabling this mode would mess up the outline expansion state in the regular view.<\/p>\n<p>Besides reviewing commits, it&rsquo;s also useful for regular coding, as it makes it easy to jump back and forth between files that I&rsquo;m working on in different folders. I find that this often works better than tabs, which require more work to set up which files to <strong>Keep Open<\/strong> and to close the ones that are no longer relevant because there isn&rsquo;t room to view many at a time.<\/p>\n<p>Instead, I tend to use tabs for files that may not be modified but that I frequently want to flip back to. For example, I want quick access to the main English <tt>Localizable.strings<\/tt> files in my project because these are hard to access using <strong>Open Quickly&#8230;<\/strong> with so many for different languages.<\/p>","protected":false},"excerpt":{"rendered":"<p>Jesse Squires: I usually use Git Tower to review and commit my changes, but you can&rsquo;t edit files in Git Tower, which means switching back-and-forth between Xcode if you need to make additional modifications. Xcode provides a nice commit interface that allows editing, but it isn&rsquo;t always easy to use for editing &mdash; the side-by-side [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2023-04-12T20:27:53Z","apple_news_api_id":"1eb4e3ae-6df1-45f5-ab4e-f41063b67e51","apple_news_api_modified_at":"2023-04-13T12:25:25Z","apple_news_api_revision":"AAAAAAAAAAAAAAAAAAAAAA==","apple_news_api_share_url":"https:\/\/apple.news\/AHrTjrm3xRfWrTvQQY7Z-UQ","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[2],"tags":[377,30,2223,71,376,226],"class_list":["post-39040","post","type-post","status-publish","format-standard","hentry","category-technology","tag-git","tag-mac","tag-macos-13-ventura","tag-programming","tag-versioncontrol","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/39040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=39040"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/39040\/revisions"}],"predecessor-version":[{"id":39041,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/39040\/revisions\/39041"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=39040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=39040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=39040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}