Mac使用Git说明 浅浅的花香味﹌ 2022-08-10 12:52 295阅读 0赞 Mac上面使用git是很方便的。 Xcode里面集成了git,前提是安装了command tool line。 如果没安装command tool line 可以通过命令:xcode-select --install 回车,然后会弹出提示框,根据操作就可以安装好,大概需要半个小时左右吧,因网速而不同。 Xcode上面使用git有一篇比较好的文档,全英文,比较简单能看懂,懒得翻译了。。。 原文链接:http://www.raywenderlich.com/51351/how-to-use-git-source-control-with-xcode-in-ios-7 原文如下: This post is also available in: [ Korean][Korean] [![How to use Git source control with Xcode][]][How to use Git source control with Xcode 1] How to use Git source control with Xcode **Note from Ray:** Tutorial Team member Felipe Laso Marsetti has ported this tutorial to iOS 7 as part of the [ iOS 7 feast][iOS 7 feast]. We hope you enjoy! Whether you’re a solo developer or working on a team, if you’re not using source control for your projects, you should be. Source control is amazing because it helps you more easily revert to older version of your code, see how your code has changed over time, and work as a team. And one of the best source control systems is built right into Xcode – Git! Git is a distributed version control system initially developed by Linus Torvalds, the principal force behind the development of the Linux kernel. The nice thing about Git is there doesn’t have to be any central repository – everyone can have their own view of the code, and pull in changes from other sources. In this tutorial, you’ll get hands on experience with Git and learn how to use it directly inside Xcode. This tutorial is fully updated for iOS 7 and covers Git using Xcode 5. So without further ado, let’s **Git** going! ## Gitting Started ## Rather than ramble on about the theory of Git, you’re going to dive right in and try it out. You’ll create a new Xcode project and try out some typical tasks you will typically do on a day-to-day basis with Git source control. So fire up Xcode and create a new **Single View Application** from the available templates. [![Single View Application Template][]][Single View Application Template 1] Now, fill in the template options as follows: [![GitUseExample Project Creation][]][GitUseExample Project Creation 1] * Product Name : GitUseExample * Company identifier : As the name indicates, it’s your company identifier, if you have one. Otherwise, type whatever. * Class prefix : Leave this empty. * Device family : iPhone Now click Next. The following dialog allows you to choose where to save your project. Choose the location and make sure “Create git repository on My Mac” is selected before you click the create button. Once you do that, click the “Create” button. [![GitUseExample Saving][]][GitUseExample Saving 1] By checking that, Xcode will create an empty Git repository and use the basis of your new project as your first commit. Well, that’s exactly what you want! ![versions database][] All source control systems, including Git, store their data into a repository so that they can manage your project versions and keep track of changes throughout the development cycle. So think of a repository as a database for versions. In the course of working on your project, you’ll add files, modify code, and change your project many times. After you make a big set of changes and are in a “known good” state (typically one or more times per day), it’s a good idea to check in your changes back into the repository. This way, you have a record of “known good” states that you can always revert back to. But what about the code that’s in your project already, that was created by the project template? Take a look at the following screen. [![GitUseExample Project Navigator][]][GitUseExample Project Navigator] Your project is still blank, and since you didn’t make changes yet, you don’t need to commit. But, basically, Xcode has added and committed several files when you created your project. That commit is the initial commit performed automatically by Xcode :\] To check that, click the **Source Control** menu item and select **History…**. [![Source Control Menu History][]][Source Control Menu History] In the drop down window, notice there’s a commit along with some information about it like the commit hash, date and time, person who made the commit, files change, and commit message. [![GitUseExample History][]][GitUseExample History 1] If you click on the text that says “Show 18 modified files” a new pane will drop down containing information about all of the files that were committed, as well as what was changed in each one. [![Commit Modified Files][]][Commit Modified Files 1] Now, try to make some changes within your files. For example, open up **AppDelegate.m**and change application:didFinishLaunchingWithOptions: to the following: <table style="margin:0px; padding:0px; outline:0px; border:currentColor; width:663px; font-family:inherit; font-size:16px; vertical-align:baseline; border-collapse:collapse; border-spacing:0px"> <tbody style="margin:0px; padding:0px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:baseline"> <tr style="margin:0px; padding:0px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:baseline"> <td style="margin:0px; padding:2px 4px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:top"> <pre style="padding:0px; outline:0px; border:currentColor; width:auto; line-height:1.333; overflow:visible; clear:none; font-family:'Droid sans Mono',sans-serif!important; font-size:12px; margin-top:0px; margin-bottom:0px; vertical-align:baseline; float:none; white-space:pre-wrap; word-wrap:break-word"><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">-</span> <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">(</span><span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">BOOL</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">)</span>application<span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">:</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">(</span>UIApplication <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">*</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">)</span>application didFinishLaunchingWithOptions<span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">:</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">(</span><a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDictionary_Class/" rel="nofollow"><span style="font-family:inherit; color:#40080; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">NSDictionary</span></a> <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">*</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">)</span>launchOptions <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">{ </span> <span style="font-family:inherit; color:#1174a; margin:0px; padding:0px; outline:0px; border:0px currentColor; font-style:italic; vertical-align:baseline">// Override point for customization after application launch.</span> NSLog<span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">(</span><span style="font-family:inherit; color:#1174a; margin:0px; padding:0px; outline:0px; border:0px currentColor; font-style:italic; vertical-align:baseline">@</span><span style="font-family:inherit; color:#bf1d1a; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">"application did finish launching"</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">)</span>; <span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">return</span> <span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">YES</span>; <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">}</span> </pre> </td> </tr> </tbody> </table> After you save the file, you will note that AppDelegate.m now has a “M” badge next to the filename: [![Modified AppDelegate.m File][]][Modified AppDelegate.m File] The “M” badge stands for “modified.” Specifically, it means you have modified a file but not yet checked in the changes to your local Git repository. Before committing, quickly add a simple UIButton to the View Controller file and a method that you link to the button. This is just to illustrate the different status indicators you will get for source control. Select **Main.storyboard** and drag a button to the screen from the Object Library. Change the button’s displayed text to whatever you want as shown in the screenshot below. [![Modified View Controller][]][Modified View Controller 1] Now, switch to **ViewController.h** and replace it with the following: <table style="margin:0px; padding:0px; outline:0px; border:currentColor; width:663px; font-family:inherit; font-size:16px; vertical-align:baseline; border-collapse:collapse; border-spacing:0px"> <tbody style="margin:0px; padding:0px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:baseline"> <tr style="margin:0px; padding:0px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:baseline"> <td style="margin:0px; padding:2px 4px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:top"> <pre style="padding:0px; outline:0px; border:currentColor; width:auto; line-height:1.333; overflow:visible; clear:none; font-family:'Droid sans Mono',sans-serif!important; font-size:12px; margin-top:0px; margin-bottom:0px; vertical-align:baseline; float:none; white-space:pre-wrap; word-wrap:break-word"><span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">@interface</span> ViewController <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">:</span> UIViewController <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">-</span> <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">(</span>IBAction<span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">)</span>clickTheButton<span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">:</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">(</span><span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">id</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">)</span>sender; <span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">@end</span> </pre> </td> </tr> </tbody> </table> Switch to **ViewController.m** and add the following code: <table style="margin:0px; padding:0px; outline:0px; border:currentColor; width:663px; font-family:inherit; font-size:16px; vertical-align:baseline; border-collapse:collapse; border-spacing:0px"> <tbody style="margin:0px; padding:0px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:baseline"> <tr style="margin:0px; padding:0px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:baseline"> <td style="margin:0px; padding:2px 4px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:top"> <pre style="padding:0px; outline:0px; border:currentColor; width:auto; line-height:1.333; overflow:visible; clear:none; font-family:'Droid sans Mono',sans-serif!important; font-size:12px; margin-top:0px; margin-bottom:0px; vertical-align:baseline; float:none; white-space:pre-wrap; word-wrap:break-word"><span style="font-family:inherit; color:#6e371a; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">#import "ViewController.h"</span> <span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">@implementation</span> ViewController <span style="font-family:inherit; color:#6e371a; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">#pragma mark - IBActions</span> <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">-</span> <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">(</span>IBAction<span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">)</span>clickTheButton<span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">:</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">(</span><span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">id</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">)</span>sender <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">{ </span> NSLog<span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">(</span><span style="font-family:inherit; color:#1174a; margin:0px; padding:0px; outline:0px; border:0px currentColor; font-style:italic; vertical-align:baseline">@</span><span style="font-family:inherit; color:#bf1d1a; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">"This is a Git tutorial"</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">)</span>; <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">}</span> <span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">@end</span> </pre> </td> </tr> </tbody> </table> The last thing to do is to link the method to the button. Switch back to **Main.storyboard**, click the View Controller in the View Controller scene, and from the Connections Inspector (last tab on the right sidebar) click on **clickTheButton:** on the Received Actions panel and drag it to the button in the Storyboard Editor. Then choose “Touch Up Inside” from the list that pops up. [![Connecting Button Action][]][Connecting Button Action 1] If you check the project navigator, you will notice that the status of three files, ViewController.h, ViewController.m and MainStoryboard.storyboard, has changed to display an M badge too. That’s because you just made changes to those files. [![Modified Project Navigator Files][]][Modified Project Navigator Files] Build and run to make sure the project works, and that when you click the button you see the “This is a Git tutorial” message logged to the console. [![Button Action Console Log][]][Button Action Console Log 1] w00t – you now have a set of code in a “known good” state, it’s time to commit! ## Making Some Commit-ments ## Committing files is simple – simply go to FileSource ControlCommit. ![commit][] A new window will show, similar to the following: [![Commit Pane][]][Commit Pane 1] As you can see, the screen is split in to two. The left pane shows the file in its current state with all changes made since the last commit. Since this is your first commit, you will see all changes made since the creation of the project. The right pane shows the file before you made your changes. [![Before And After][]][Before And After 1] Note the blue selections in the code panes. Those indicate the code you added. Even if you add a blank line or white space, Xcode assumes it’s a change and will indicate it with those blue selections. Try it for yourself: tap the “Cancel” button, go back to **ViewController.h**, press the Return key to make a new line (or several). Then go to the Source Control menu and select Commit one more time. You should result similar to the following: [![Git Modifications][]][Git Modifications 1] This might be a bit obvious, but Git does carefully track every single change you make throughout your development cycle. Let’s take a deeper look on that screen to see what Xcode has prepared for you. [![Commit Pane Layout][]][Commit Pane Layout 1] The left pane shows your project files, you can notice these files with the M status which you just modified. Xcode, by default, checks all the files with the M status and assumes that you want to commit all of them. If you want to eliminate one or more files from being committed, you simply need to uncheck it. You can also decide what to commit within the file and discard individual changes made. This is called “cherry picking” changes. Let’s try it out! In the version editor, all your changes are enumerated by Xcode. If you scroll the editor, you will see change 1,2, etc., as shown in the screenshot above. Each change is checked by default. To eliminate a specific change from being committed just uncheck it. For example, change 1 is not important since it’s a class extension and that could be useful later on. So uncheck that one so that change isn’t committed. [![Cherry Picking][]][Cherry Picking 1] Notice the indicator has turned to gray, to make it clear that change is now excluded from the commit process. Another way to exclude an individual change in the same file, is to click on the arrow next the change number. Two options will appear: “Commit” (or “Don’t Commit” in case the change is checked) and “Discard Change”. In this case, you just need to select “Don’t Commit”. [![Screen Shot 2013-09-24 at 8.14.19 PM][]][Screen Shot 2013-09-24 at 8.14.19 PM] Now let’s commit the rest of the changes. Before you do, be sure to enter a commit message in the bottom part of the screen. This helps you better understand at a glance what each set of changes contain. [![Commit Message][]][Commit Message 1] Then click commit. Congrats, you have made your first commit! If you go back to the History pane you should see your new commit in the log: [![Commit History][]][Commit History 1] This simple process (making changes, and then committing them) is what you’ll be doing 90% of the time. Pretty easy, eh – so you have no excuse not to do it! :\] ## Branching Off ## Another feature in Xcode is committing your changes to a specific branch. But wait a minute – what’s a branch? Actually, believe it or not you’re already using a branch. When it’s first created, your project is associated to a branch called “master”. This branch is created automatically by Xcode and, as its name indicates, is the main branch of your project. “But what is a main branch?”, you may ask. Hmm, ok. Take a look at the following picture: [![Branching][]][Branching 1] Basically, the master branch should always keep the main copy of your project. So, when you are working on a project, master should usually refer to the release version. But you can have other branches as well. One good use for branches is to keep track of experimental new features that aren’t quite ready for the release version. For example, let’s say you’re adding a new map feature into your app, but it isn’t quite ready for production. To simulate this, create a new class derived from `NSObject` and name it **MapForItenerary**. At this point your project might look like this: [![Adding New File][]][Adding New File 1] Notice the status “A” for the two new files MapForItinerary.h and MapForItinerary.m. This indicates there is a new file that has not yet been committed to the repository. Now, go to the Commit option in the Source Control menu. [![Commit Menu For New File][]][Commit Menu For New File 1] If you select one of the files with the A status, you may notice that Xcode didn’t provide any earlier version to compare to. This is because the file hasn’t been committed to the repository yet, so there is nothing to compare it with. Ok, so you added 2 files (MapForItinerary.h, MapForItinerary.m) to the project – Xcode detected that and is ready to commit. However, you may want to commit these new changes to another specific branch. That will help to isolate the risk in case there are some problems with your new map code, as you’ll see later. Instead of clicking the “Commit 4 Files” button, click the “Cancel” button instead and go to Source Control, select the current branch under “Working Copies” and then select “New Branch…”. [![Source Control Menu New Branch][]][Source Control Menu New Branch 1] The following dialog will appear to give you the option to name your new branch: [![New Branch Name Pane][]][New Branch Name Pane 1] Name the branch “map\_feature” and click the “Create” button. You are automatically switched to the new branch so go ahead and commit these changes and give them a descriptive message: [![Commit Message][Commit Message 2]][Commit Message_Commit Message 2] Once you finish, click the commit button again. You will see the status letters next to your map files has been cleared. That’s because Xcode has added those files when you committed. [![Project Navigator After Commit][]][Project Navigator After Commit] You can now see your branches in the Source Control menu by selecting “Configure GitUseExample” under “Working Copies”: [![Configuring Git Project][]][Configuring Git Project 1] And then, inside the configuration pane, select the “Branches” tab: [![Branches Tab][]][Branches Tab 1] ## Backing Out ## Let’s say you’re working on the latest revision of your project, adding code, and so on. But it appears that you’ve taken a wrong turn somewhere and the project isn’t compiling properly. At this point, you may want to recover the last revision from source control and start fresh. ![badstableversion][] Git provides this kind of project backup :\] Let’s try it. Go to **MapForItinerary.h** and make the following changes: <table style="margin:0px; padding:0px; outline:0px; border:currentColor; width:663px; font-family:inherit; font-size:16px; vertical-align:baseline; border-collapse:collapse; border-spacing:0px"> <tbody style="margin:0px; padding:0px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:baseline"> <tr style="margin:0px; padding:0px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:baseline"> <td style="margin:0px; padding:2px 4px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:top"> <pre style="padding:0px; outline:0px; border:currentColor; width:auto; line-height:1.333; overflow:visible; clear:none; font-family:'Droid sans Mono',sans-serif!important; font-size:12px; margin-top:0px; margin-bottom:0px; vertical-align:baseline; float:none; white-space:pre-wrap; word-wrap:break-word"><span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">@interface</span> MapForItinerary <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">:</span> <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSObject_Class/" rel="nofollow"><span style="font-family:inherit; color:#40080; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">NSObject</span></a> <span style="font-family:inherit; color:#1174a; margin:0px; padding:0px; outline:0px; border:0px currentColor; font-style:italic; vertical-align:baseline">// This is a fake method just to make the discard action clear for you</span> <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">-</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">(</span><span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">void</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">)</span>fakeMethod; <span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">@end</span> </pre> </td> </tr> </tbody> </table> And replace **MapForItinerary.m** to look like this: <table style="margin:0px; padding:0px; outline:0px; border:currentColor; width:663px; font-family:inherit; font-size:16px; vertical-align:baseline; border-collapse:collapse; border-spacing:0px"> <tbody style="margin:0px; padding:0px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:baseline"> <tr style="margin:0px; padding:0px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:baseline"> <td style="margin:0px; padding:2px 4px; outline:0px; border:0px currentColor; font-family:inherit; vertical-align:top"> <pre style="padding:0px; outline:0px; border:currentColor; width:auto; line-height:1.333; overflow:visible; clear:none; font-family:'Droid sans Mono',sans-serif!important; font-size:12px; margin-top:0px; margin-bottom:0px; vertical-align:baseline; float:none; white-space:pre-wrap; word-wrap:break-word"><span style="font-family:inherit; color:#6e371a; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">#import "MapForItinerary.h"</span> <span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">@implementation</span> MapForItinerary <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">-</span> <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">(</span><span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">void</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">)</span>fakeMethod <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">{ </span> <span style="font-family:inherit; color:#1174a; margin:0px; padding:0px; outline:0px; border:0px currentColor; font-style:italic; vertical-align:baseline">// This is a fake method just to make the discard action clear for you</span> NSLog<span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">(</span><span style="font-family:inherit; color:#1174a; margin:0px; padding:0px; outline:0px; border:0px currentColor; font-style:italic; vertical-align:baseline">@</span><span style="font-family:inherit; color:#bf1d1a; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">" Discarding changes allow you to get the latest revision you have worked on it."</span><span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">)</span>; <span style="font-family:inherit; color:#0220; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">}</span> <span style="font-family:inherit; color:#a61390; margin:0px; padding:0px; outline:0px; border:0px currentColor; vertical-align:baseline">@end</span> </pre> </td> </tr> </tbody> </table> You’ll notice that the status of the modified files has changed to M, meaning that the files are locally modified and are waiting to be committed. At this point, you can selectively discard the changes you’ve made to the file. Select **MapForItinerary.h** in the project navigator and then select Discard Changes in “MapItinerary.h” from the Source Control menu. [![Discarding File Change][]][Discarding File Change 1] A prompt will show up, asking you whether you really want to discard the changes you made to that file. [![Discard Prompt][]][Discard Prompt 1] Click the “Discard Changes” button. You should see the code you just added vanish! This can be extremely useful when you’ve added some changes but they aren’t working, and you want to get back to the last known good state. In addition to discarding an entire file’s worth of changes, you can discard individual changes as well. As this point, MapForItinerary.m should still have the “M” change on it. Select the commit option from the Source Control menu, and find the change to MapForIternerary.m. Click the badge in the middle and choose Discard Change: [![Selective Discard][]][Selective Discard 1] A prompt window will appear, click OK and the change should disappear. If you want to cancel your action, press Command + Z. Boom – the change is gone! Go ahead and enter a log message and finish the commit. Now that you’ve tried out “Discard Change”, you might wonder what the difference is between that and the “Don’t Commit” option you chose earlier. It’s true that both of these options result in the change not being pushed to the repository, but there is a difference: * **Don’t Commit** lets you skip the change so that it won’t be committed with other changes, but it will remain in the local source code. * **Discard Changes** not only skips the change, but also deletes it from the local source code. ## Time Travel ## Discarding changes is a good way to revert back to working code and save you time. However, it can be a little limiting in some cases. Let’s go back to the commit action for a moment. Commit allows you to save multiple revisions for your project where each revision has specific changes. These are all stored into a repository managed for you by Git. If you choose to discard changes made to a file, this will give you the **last** committed version of the file and only the last. And that’s actually where the limitation lies. Let’s say your project repository contains several revisions over time and that you want to get the first one for a particular file or the second version, but not necessarily the last. Discarding changes doesn’t get you that. But there’s a way this can be done easily with Xcode and Git. Select the file that you want to revert back to from a previous revision from the Project Navigator. Let’s say **ViewController.m**, then go to View > Version Editor > Show Version Editor. (Alternatively, you can tap the third button under the Editor section on the toolbar at the top right of the Xcode window.) The version editor is split into two panes as shown below: [![Version Editor][]][Version Editor 1] This allows you to compare two revisions of the selected file. In your case, two revisions of**ViewController.m**. The comparison is based on the time line, so click the timeline viewer icon (marked on the screenshot below) to show it up. [![Version Editor Icon][]][Version Editor Icon 1] Now, you can move up and down the timeline using your mouse cursor to select the version you want to get back to. [![Version Editor Rollback][]][Version Editor Rollback 1] For example, the oldest version of the ViewController.m file, as shown in the image above, was committed on September the 24th. If that is the version that you are looking for then simply tap the indicator for the revision to open that specific version in the right editing pane :\] [![Comparing File Versions][]][Comparing File Versions 1] Now, to revert to that file version, just click the middle section of a change in the comparison pane and select “Discard Change”. It’s that easy! :\] Another useful feature which is good to know about is the Blame view. This view allows you to catch every commit on your file easily, in real time, so that you can distinguish which commit deals with each revision. Let’s switch to the blame view. Click and hold down the left mouse button on the version editor button, then select “Blame”. [![Screen Shot 2013-09-26 at 10.05.13 PM][]][Screen Shot 2013-09-26 at 10.05.13 PM] You will get something like this: [![Screen Shot 2013-09-26 at 10.06.44 PM][]][Screen Shot 2013-09-26 at 10.06.44 PM 1] Choose the file you want to view its commits from the project navigator pane, for example, ViewController.m. In the right sidebar, you may notice all the commits you did for this file. Actually, blame view is the best way to see all the commits from different revisions related to a specific file, all merged together in one place. To see more details around a committed change press the info button next to the date, you will see the revision ID that belongs to the change, who did that change, and other eventual files changed in the same revision. That’s better than going to your project repository in the organizer and searching for such changes, isn’t it? :\] [![Commit Info][]][Commit Info 1] ## Branching : Isolating the risk ## Git allows you to work on multiple streams of revisions and these different streams are known as branches. The main code you work on for a project is called the **main** branch. So, as you work on a project, you might branch off a development stream from the main branch to a secondary branch – sort of like a tree. Typically, it’s good coding practice to always work on a copy of your project – the development branch, if you will. And once you complete a development milestone, you normally merge the development branch back to master. ![trunk][] Let’s practice working with branches! Go to the Source Control menu item and, under Working Copies, select “Switch to Branch…”. [![Switching Branches][]][Switching Branches 1] From the list of available branches select master and click Done. [![Switching to master][]][Switching to master 1] When you create a new branch you start off from the state of the current branch you are working on. In this case you are switching to master so you start with the work from that branch. You don’t want to use map\_feature for now as it’s still not finished and it’s related to another feature that may not make it into the app any time soon. Go to the Source Control menu and, also under Working copies, select “New Branch…”. [![Screen Shot 2013-09-26 at 10.23.47 PM][]][Screen Shot 2013-09-26 at 10.23.47 PM 1] Name the branch “New-Branch” and click Create. [![New Branch Name][]][New Branch Name 1] To switch between branches using Xcode, first make sure that the project directory is selected and then click the “Switch Branch” icon on the bottom right corner. ![switch branch][] You can verify that you are working on “New-Branch” by clicking in the Source Control menu item and looking at the name of the branch under Working Copies. [![Verifying Branch][]][Verifying Branch 1] Now, let’s see how changes performed on a branch will be applied to master when merging. What you are going to do is add a simple UILabel to the user interface in the new branch you created. Then, you will merge the new branch back to master and verify it works. Switch back to the standard editor view, select **Main.storyboard**, bring up the object library, and drag a UILabel on to the main view. [![My New Label][]][My New Label 1] Save and run to make sure that all is OK and then commit changes to the repository. Be sure to add a commit message. Now switch to the master branch and run the app again. You’ll notice that the new UILabel you added in the branch is not there. Obviously, that’s because you changed the working branch. The final job is to merge the new branch back to master, or, in other words, apply the changes performed in New-Branch to master. Go to Source Control > Working Copies > Merge from Branch…. [![Merge From Branch][]][Merge From Branch 1] From the list of available options select New-Branch and click Merge. [![Branch Selection][]][Branch Selection 1] A new window will show up where you can use the left and right buttons on the bottom menu to specify the direction of the merge. In your case, you want to merge the new branch into the master branch which is the current one. Since the current branch is on the left and the new branch is on the right, you can leave the switch at the bottom of the pane as is (shown in the image). [![Merging your branch][]][Merging your branch 1] Finally, click the “Merge” button to start the process :\] You might be prompted at this point to enable automatic snapshots. Since you have your changes going to a Git repository, the snapshot feature is not necessary, so select “Disable.” If all goes well, you should see the changes (the UILabel) from the new branch appear in the user interface when you click on Main.storyboard or when you run your application. Now your changes are in the master branch because of the merge! [![iOS Simulator Screen shot Sep 26, 2013 10.37.56 PM][iOS Simulator Screen shot Sep 26_ 2013 10.37.56 PM]][iOS Simulator Screen shot Sep 26_ 2013 10.37.56 PM_iOS Simulator Screen shot Sep 26_ 2013 10.37.56 PM] ## Where To Go From Here? ## Congratulations, you now know how to use Git source control from Xcode, use branches, merge branches, and more! At this point you have most of the tools you’ll need on a day-to-day basis to work with Git source control in Xcode. If you’d like to learn more, check out our new book [iOS 7 by Tutorials][], which includes two complete chapters that go into much more detail into Xcode and Git integration. I hope you enjoyed this tutorial, and I am looking forward for your comments! :\] 以上内容,如有侵权请留言告知,本人会删除。 [Korean]: http://www.raywenderlich.com/ko/57201/xcode-%EC%99%80-%ED%95%A8%EA%BB%98%ED%95%98%EB%8A%94-git-%EC%86%8C%EC%8A%A4%EA%B4%80%EB%A6%AC-ios7-%EC%9A%A9 [How to use Git source control with Xcode]: http://cdn3.raywenderlich.com/wp-content/uploads/2012/05/tuto1.png [How to use Git source control with Xcode 1]: http://www.raywenderlich.com/13771/how-to-use-git-source-control-with-xcode-in-ios-6/tuto1 [iOS 7 feast]: http://www.raywenderlich.com/49762/introducing-the-ios-7-feast [Single View Application Template]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.21.47-PM-477x320.png [Single View Application Template 1]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.21.47-PM.png [GitUseExample Project Creation]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.22.37-PM-475x320.png [GitUseExample Project Creation 1]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.22.37-PM.png [GitUseExample Saving]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.22.48-PM-480x54.png [GitUseExample Saving 1]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.22.48-PM.png [versions database]: http://cdn1.raywenderlich.com/wp-content/uploads/2012/05/42.png [GitUseExample Project Navigator]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.26.38-PM-e1380065401439.png [Source Control Menu History]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.34.47-PM-e1380066015693.png [GitUseExample History]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/GitUseExample-History-480x304.png [GitUseExample History 1]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/GitUseExample-History.png [Commit Modified Files]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.43.54-PM-700x395.png [Commit Modified Files 1]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.43.54-PM.png [Modified AppDelegate.m File]: http://cdn2.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.47.33-PM-e1380066490320.png [Modified View Controller]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.49.56-PM-579x500.png [Modified View Controller 1]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.49.56-PM.png [Connecting Button Action]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.55.33-PM-333x500.png [Connecting Button Action 1]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.55.33-PM.png [Modified Project Navigator Files]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.56.43-PM-e1380067050599.png [Button Action Console Log]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.58.40-PM-700x50.png [Button Action Console Log 1]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-6.58.40-PM.png [commit]: http://cdn3.raywenderlich.com/wp-content/uploads/2012/05/commit-324x320.png [Commit Pane]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-7.06.11-PM-460x320.png [Commit Pane 1]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-7.06.11-PM.png [Before And After]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Before-And-After-460x320.png [Before And After 1]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Before-And-After.png [Git Modifications]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-7.11.26-PM-480x138.png [Git Modifications 1]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-7.11.26-PM.png [Commit Pane Layout]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-7.14.43-PM-700x338.png [Commit Pane Layout 1]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-7.14.43-PM.png [Cherry Picking]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.12.04-PM-700x146.png [Cherry Picking 1]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.12.04-PM.png [Screen Shot 2013-09-24 at 8.14.19 PM]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.14.19-PM-e1380072767159.png [Commit Message]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.17.59-PM-480x79.png [Commit Message 1]: http://cdn2.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.17.59-PM.png [Commit History]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.20.52-PM-480x304.png [Commit History 1]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.20.52-PM.png [Branching]: http://cdn4.raywenderlich.com/wp-content/uploads/2012/07/4-1-274x320.png [Branching 1]: http://www.raywenderlich.com/13771/how-to-use-git-source-control-with-xcode-in-ios-6/4-1 [Adding New File]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.24.01-PM-253x320.png [Adding New File 1]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.24.01-PM.png [Commit Menu For New File]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.25.31-PM-480x211.png [Commit Menu For New File 1]: http://cdn2.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.25.31-PM.png [Source Control Menu New Branch]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.30.04-PM-480x149.png [Source Control Menu New Branch 1]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.30.04-PM.png [New Branch Name Pane]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.30.32-PM-480x185.png [New Branch Name Pane 1]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.30.32-PM.png [Commit Message 2]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.35.21-PM-700x293.png [Commit Message_Commit Message 2]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.35.21-PM.png [Project Navigator After Commit]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.36.21-PM-e1380073080118.png [Configuring Git Project]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.40.27-PM-480x140.png [Configuring Git Project 1]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.40.27-PM.png [Branches Tab]: http://cdn2.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.40.41-PM-474x320.png [Branches Tab 1]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.40.41-PM.png [badstableversion]: http://cdn3.raywenderlich.com/wp-content/uploads/2012/05/badstableversion.png [Discarding File Change]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.45.33-PM-347x320.png [Discarding File Change 1]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.45.33-PM.png [Discard Prompt]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.46.49-PM-480x150.png [Discard Prompt 1]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.46.49-PM.png [Selective Discard]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.49.04-PM-480x240.png [Selective Discard 1]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-24-at-8.49.04-PM.png [Version Editor]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.00.11-PM-700x325.png [Version Editor 1]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.00.11-PM.png [Version Editor Icon]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.01.08-PM-700x319.png [Version Editor Icon 1]: http://cdn2.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.01.08-PM.png [Version Editor Rollback]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.02.30-PM-700x320.png [Version Editor Rollback 1]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.02.30-PM.png [Comparing File Versions]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.03.51-PM-700x320.png [Comparing File Versions 1]: http://cdn2.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.03.51-PM.png [Screen Shot 2013-09-26 at 10.05.13 PM]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.05.13-PM-e1380251180568.png [Screen Shot 2013-09-26 at 10.06.44 PM]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.06.44-PM-700x399.png [Screen Shot 2013-09-26 at 10.06.44 PM 1]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.06.44-PM.png [Commit Info]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.09.33-PM-480x192.png [Commit Info 1]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.09.33-PM.png [trunk]: http://cdn4.raywenderlich.com/wp-content/uploads/2012/05/trunk.png [Switching Branches]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.15.36-PM-480x140.png [Switching Branches 1]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.15.36-PM.png [Switching to master]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.15.22-PM-470x320.png [Switching to master 1]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.15.22-PM.png [Screen Shot 2013-09-26 at 10.23.47 PM]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.23.47-PM-480x150.png [Screen Shot 2013-09-26 at 10.23.47 PM 1]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.23.47-PM.png [New Branch Name]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.12.24-PM-480x202.png [New Branch Name 1]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.12.24-PM.png [switch branch]: http://cdn1.raywenderlich.com/wp-content/uploads/2012/05/113-480x133.png [Verifying Branch]: http://cdn2.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.22.49-PM-480x96.png [Verifying Branch 1]: http://cdn4.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.22.49-PM.png [My New Label]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.28.43-PM-347x500.png [My New Label 1]: http://cdn1.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.28.43-PM.png [Merge From Branch]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.31.53-PM-480x151.png [Merge From Branch 1]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.31.53-PM.png [Branch Selection]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.32.52-PM-478x320.png [Branch Selection 1]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.32.52-PM.png [Merging your branch]: http://cdn2.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.35.21-PM-700x319.png [Merging your branch 1]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/Screen-Shot-2013-09-26-at-10.35.21-PM.png [iOS Simulator Screen shot Sep 26_ 2013 10.37.56 PM]: http://cdn5.raywenderlich.com/wp-content/uploads/2013/09/iOS-Simulator-Screen-shot-Sep-26-2013-10.37.56-PM1-281x500.png [iOS Simulator Screen shot Sep 26_ 2013 10.37.56 PM_iOS Simulator Screen shot Sep 26_ 2013 10.37.56 PM]: http://cdn3.raywenderlich.com/wp-content/uploads/2013/09/iOS-Simulator-Screen-shot-Sep-26-2013-10.37.56-PM1.png [iOS 7 by Tutorials]: http://www.raywenderlich.com/store/ios-7-by-tutorials
还没有评论,来说两句吧...