The previous module on rebasing taught us how to move commits around and perform some basic edits while doing so, but now we’re going to really get our hands dirty. We’ll learn how to split up commits, revive lost snapshots, and completely rewrite a repository’s history to our exact specifications.
Continue readingCoding
Git (Chapter 6: Rebasing)
Let’s start this module by taking an in-depth look at our history. The six commits asterisked below are part of the same train of thought. We even developed them in their own feature branch. However, they show up interspersed with commits from other branches, along with a superfluous merge commit (b9ae1bc). In other words, our repository’s history is kind of messy:
Continue readingGit (Chapter 5: Branches Part 2)
We’ve covered the mechanics behind Git branches, we can discuss the practical impact that they have on the software development process. Instead of introducing new commands, this module covers how the typical Git user applies this workflow to real projects, as well as some of the problems that arise in a branched environment.
Continue readingGIT (Chapter 4: Branches)
Branches are the final component of Git version control. This gives us four core elements to work with throughout the rest of this tutorial:
- The Working Directory
- The Staged Snapshot
- Committed Snapshots
- Development Branches
Git (Chapter 3: Undoing Changes)
In the last module, we learned how to record versions of a project into a Git repository. The whole point of maintaining these “safe” copies is peace of mind: should our project suddenly break, we’ll know that we have easy access to a functional version, and we’ll be able to pinpoint precisely where the problem was introduced.
Continue readingHow to check whether a module is available using canImport()
Writing multi-platform code has its own challenges, but if you use the canImport()
compiler test then one big challenge is solved for you: you can write one chunk code to run if a specific module is available, and another chunk otherwise.
Git (Chapter 2: The Basics)
Now that you have a basic understanding of version control systems in general, we can start experimenting with Git. Using Git as a VCS is a lot like working with a normal software project. You’re still writing code in files and storing those files in folders, only now you have access to a plethora of Git commands to manipulate those files.
Continue readingGIT (Chapter 1: Introduction)
Introduction
Git is a version control system (VCS) created for a single task: managing changes to your files. It lets you track every change a software project goes through, as well as where those changes came from. This makes Git an essential tool for managing large projects, but it can also open up a vast array of possibilities for your personal workflow.
Continue readingPure Swift Protocol ‘weak var delegate’ error
Just like anyone else you have encounter this error too. Writing a pure swift protocol and declaring the weak delegate you must have encountered error mentioned below.
[swift] weak var delegate: TestProtocol? [/swift]
|
Swift Closures Syntax
We all have a bad memory when it comes to specific syntax of Closure. At least this post is going to help me, throwing out there if someone else can be benefited by it. Happy Swifting
As a variable:
[swift]
var closureName: (ParameterTypes) -> (ReturnType) [/swift]
As an optional variable:
[swift]
var closureName: ((ParameterTypes) -> (ReturnType))?
[/swift]
|