When you are going to start a major milestone, it is very important to keep the backup of the current final source. Using source control is one of the best solution here. But I have seen people who take manual copies of the project when they start a major work. Basically, they copy the entire project's root folder and paste it somewhere else. At a point of time, these backups occupies over GB's of space, and it is also very difficult to restore to the backup. But the XCode has a amazing feature which will take of this.
It is none other than "SnapShots". You should have already seen this. When you do some major editing processes such refactoring the project, whole find or replace and some other processes. We can also take manual snapshots when we start some major change. You can take snapshots by selecting File->Take Snapshot
Also if you want the XCode to take automatic snapshots when the build succeeds or finishing some other processes, you can do that by enabling a checkbox in the XCode->Behaviour->Select option->Create Snapshot.
You can restore the project to these snapshots at any time in the future. This will update the current source code to its origin source during the time of the snapshot. This may be very helpful than taking manual copies. File->Restore Snapshot->Choose the snapshot to be restored->Restore.
The XCode will open an interface comparing the files before and after restoring the snapshot. You can manually select any change and discard it if you don't want it.
Git Vs Snapshot
If you are using Git or some other source control software, you may confuse both of them. Git and Snapshot are not same and they cannot be used interchangeably. Snapshot saves the changes of a file in a format only the XCode will understand but the Git is an universal technology. But in some situations you may have to use both of them. Using Git is a must one for the project, but using Snapshot will help you to do restore temporary backups.
When you start work on a milestone, you can discard all local change in Git at any time. But you can't have many commits like "Temp Commit", "temp commit2"... Because when working with a team, you can't commit a project often. So in this case you can use the snapshots. Because the snapshots are local copies which will not affect the remote source.
Also you can share the snapshots to other people. All your snapshots are located under the folder
~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage
It is none other than "SnapShots". You should have already seen this. When you do some major editing processes such refactoring the project, whole find or replace and some other processes. We can also take manual snapshots when we start some major change. You can take snapshots by selecting File->Take Snapshot
Also if you want the XCode to take automatic snapshots when the build succeeds or finishing some other processes, you can do that by enabling a checkbox in the XCode->Behaviour->Select option->Create Snapshot.
You can restore the project to these snapshots at any time in the future. This will update the current source code to its origin source during the time of the snapshot. This may be very helpful than taking manual copies. File->Restore Snapshot->Choose the snapshot to be restored->Restore.
The XCode will open an interface comparing the files before and after restoring the snapshot. You can manually select any change and discard it if you don't want it.
Git Vs Snapshot
If you are using Git or some other source control software, you may confuse both of them. Git and Snapshot are not same and they cannot be used interchangeably. Snapshot saves the changes of a file in a format only the XCode will understand but the Git is an universal technology. But in some situations you may have to use both of them. Using Git is a must one for the project, but using Snapshot will help you to do restore temporary backups.
When you start work on a milestone, you can discard all local change in Git at any time. But you can't have many commits like "Temp Commit", "temp commit2"... Because when working with a team, you can't commit a project often. So in this case you can use the snapshots. Because the snapshots are local copies which will not affect the remote source.
Also you can share the snapshots to other people. All your snapshots are located under the folder
~/Library/Application Support/Developer/Shared/SnapshotRepository.sparseimage
No comments:
Post a Comment