• About
  • Releases
  • Blog
  • Shortcuts
  • Q & A
  • Git

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

macOS has git installed by default.

You can check version of git on your computer with this command:

git --version

If you need git, you can download it following this official web address:

https://git-scm.com/downloads

Example: On the image bellow we are in directory called myRepo. First we add all changes (git add .), commit changes with message and in the last step we push changes to remote repository.

Here are some most used git commands (cheat sheet):

Create Git Repo
From existing directory
  • cd project_dir
  • git init
  • git add .
From other repository
  • git clone existing_dir new_dir
  • git clone url...
  • git add .
Branching
List branches
  • git branch
List branches
  • git branch
Switch to branch
  • git checkout branchName
Create new branch
  • git branch branchName
Delete branch
  • git branch -d branchName
Local changes
Check local changes
  • git status
Tracked file changes
  • git diff
Add changed files
  • git add fileName
    all: git add .
Remove file
  • git rm file
Commit changes
  • git commit
  • git commit -m "My message..."
Change last commit
  • git commit --amend
Revert changes to file
  • git checkout -- file
History
Show all commits
  • git log
Short Format
  • git log --pretty=-short
Patches
  • git log -p
Show file commits
  • git log file
Show directory commits
  • git log dir/
Stats
  • git log --stat
Who changed file
  • git blame file
Debug area Variable view

Xcode's variable viewer is a feature that allows developers to inspect and monitor the values of variables and objects while debugging their code.

It provides a graphical interface for examining the state of variables and data structures in your program during runtime.

Debug area Console

LLDB (Low-Level Debugger) is an integrated debugger in Xcode used for exploring and debugging iOS applications at runtime.

When the app stops at a breakpoint, we have the option to examine variables using Xcode's variable viewer (on the left 👈🏻) or utilize LLDB's console commands.