swiftlings

(β˜… 42)

πŸ¦‰ Learn Swift interactively by fixing small exercises, inspired by Rustlings

File Explorer

  • .gitignore
  • .swiftformat
  • .swiftlint.yml
  • brief.md
  • build-debug.sh
  • build-release.sh
  • format.sh
  • LICENSE
  • Makefile
  • Package.swift
  • README.md
  • run-swift-test.sh

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Command Glossary

Commands referenced in this DOCs, explained below.

πŸ”

brew install

View Details β–Ό

Install a Homebrew formula or cask.

brew install {{formula|cask}}

Install a formula/cask:

brew install {{[-s|--build-from-source]}} {{formula}}

Build and install a formula from source (dependencies will still be installed from bottles):

brew install {{[-n|--dry-run]}} {{formula|cask}}

Download the manifest, print what would be installed but don't actually install anything:

πŸ”

brew tap

View Details β–Ό

Tap a Homebrew formula repository. If no arguments are provided, list all installed Homebrew taps.

brew tap

List installed Homebrew taps:

brew tap {{github_username}}/{{github_repository_name}}

Tap a Git repository hosted on GitHub:

brew tap {{username}}/{{repository_name}} {{git_clone_url}}

Tap a Git repository hosted outside of GitHub:

πŸ”

brew update

View Details β–Ό

Fetch the newest version of Homebrew and all formulae from GitHub using `git` and perform any necessary migrations.
To upgrade all installed formulae, use `brew upgrade`.

brew {{[up|update]}}

Fetch the newest version of Homebrew and all formulae:

πŸ”

brew upgrade

View Details β–Ό

Upgrade outdated formulae and casks.

brew upgrade

Upgrade all outdated casks and formulae:

brew upgrade {{formula|cask}}

Upgrade a specific formula/cask:

brew upgrade {{[-n|--dry-run]}}

Print what would be upgraded, but don't actually upgrade anything:

πŸ”

git checkout

View Details β–Ό

Checkout a branch or paths to the working tree.

git checkout -b {{branch_name}}

Create and switch to a new branch:

git checkout -b {{branch_name}} {{reference}}

Create and switch to a new branch based on a specific reference (branch, remote/branch, tag are examples of valid references):

git checkout {{branch_name}}

Switch to an existing local branch:

πŸ”

git clone

View Details β–Ό

Clone an existing repository.

git clone {{remote_repository_location}} {{path/to/directory}}

Clone an existing repository into a new directory (the default directory is the repository name):

git clone --recursive {{remote_repository_location}}

Clone an existing repository and its submodules:

git clone {{[-n|--no-checkout]}} {{remote_repository_location}}

Clone only the `.git` directory of an existing repository:

// repository documentation