Run Xcode `git pull` and `git Push` commands in terminal
After some researches, I've just found an alternative solution for my problem, though it does not exactly answer what I asked.

Reference

Action:


Create a file, name it something like: git02
Open and add write this:


#!/bin/bash

echo $1;
ssh-agent bash -c "ssh-add ~/.ssh/id_rsa2; $1"



open terminal in the same folder, type $ chmod +x git02
Copy this file to /usr/local/bin
Execute desired command using something like this: $ git02 'git pull'


Work perfect for me now.