Member preview

Which commands do I use in my terminal all day?

Update: July 07, 2018.

Everyday I use a lot different tools. You know what I mean you had have read 5.9K thanks a lot. ☺️

Now I would like to share which commands that I use to improve my works, commits and etc … There is no big title label, just commands and benefits. Let’s get started.

$ xcversion selected

by this command I can easily install and update new or previous Xcodes automatically. If you are working with conversion from Swift 3 ->Swift 4 or Swift 2->Swift 3 ( Trust me there is still Swift 2 project a lot ) You can easily download whatever you need. Github link

$ xclint MyProject.xcodeproj

xclint is a command line tool written in Swift that validates the state of your Xcode Project. It's able to find duplicated and missing files, inconsistencies between the groups and the folders in your system. It is more than better Slender. Github link

$ dark-mode on or $ dark-mode off

I manage the macOS dark mode from the command-line easily. Github link

$ git commit --amend -m "New message"

If I need to change commit title after push. I am using this methods above. Github link

$ xcrun simctl io booted screenshot ./screen.png

For completing iOS project story I have sub-tasks QA and VQA. Sometimes the environment cannot work and QA or VQA need to close their task. One screenshot can help them and I can easily create it.

$ git stash

I would like to keep clean my repos and my company’s project repos. I really don’t want to commit every changes but also I don’t want to lose updated code files. git stash command saves our code without making a commit.

$ jenv local & jenv local 9.0.1

I need to work different java versions and I am using jenv. Github link

$ git bisect

I use to git bisect. This tool allows me to find an offend and bad commits in my project. For example, you’ve found a bug in your codebase and you’re not sure of when it was introduced.

$ brew update && brew upgrade && brew cleanup

I am keeping updated all my packages and I can cleanup all out of date formuale.

$ fastlane scan

I create an integration with FBSnapshotTest library. With fastlane scan I can run all test methods ( XCTest, Quick, Nimble ) automatically. Github link

$ git for-each-ref — count=10 — sort=-committerdate refs/heads/ — format=”%(refname:short)”

This command help me to find which branch can not merge with master.

$ synx path/to/my/project.xcodeproj

I can reorganizes my Xcode project folder to match my Xcode groups. Use this command be sure source control before doing anything. Github link

$ git checkout HEAD~2

HEAD is the currently checked out commit, and HEAD~n is nth commit before that. So it’s the version two commits ago. If you want to go back twenty commit ago update number from 2 to 20.

$ speed-test

I am using Comcast at the home and the office also I could not remember when I used last time cable. I am never alone to use Wifi Router and it can be sometimes headache with speed-test I can test my internet connection speed and ping using from the terminal. Github link

$ sudo shutdown -h now

I am shutting down MacBook from the terminal without entering password.

$ git log --oneline --decorate --graph

More readable and friendly git log .

$ instruments -s devices

To list the available devices you can choose from, execute the following on a terminal.

$ sudo xcrun xcscontrol — reset

I manage Xcode Server activities ( start, stop, restart). Also I reset Xcode Server using the command below

$ open /Applications/

This command will open iPhone X automatically. I use this command, if I need second simulator immediately.

$ xcrun simctl openurl booted

Sometimes, I need to test Bitrise build with iOS simulator. With this command, I can easily open Bitrise link with the simulator browser.

If you know good tips & tricks, feel free to share with me.That’s it. 😃😃😃 Thanks for reading.

If you want to follow me in social media, here are some links: github, twitterlinkedin

You can check my previous articles here.