Nástroje používateľa

Nástoje správy stránok


Bočný panel

Sidebar


Články

Prečítané diela

Hlášky

Projekty

Tagy

Twitter


blog:odborny:2015-07-08-integrating_xcode_project_and_github:assembla

Integrating Xcode project and GitHub / Assembla

This short article will guide you stepbystep through creating Xcode project with local and remote Git repository (GitHub or Assembla) using SSH public/private keys authentication on remote side.

Part I: Creating Xcode project and local repository

First part is really simple:

  1. Open Xcode
  2. Create new project: File → New → Project…
  3. Check the “Create Git repository on My Mac” option during the project creation
  4. Change some files and try commiting the changes, everything should work well

Part II: Creating remote repository

Now, proceed to remote

  1. create repository
  2. generate SSH keys to access repository:
    ssh-keygen -t rsa -f path/to/private/key
  3. git remote add origin git@github.com:FurloSK/gittest.git

Part III: Connecting local and remote repositories

  1. TODO generate SSH keys
  2. Create config file in ~/.ssh/ directory:
    touch config
  3. Open the file: open config
  4. Paste this text into file, edit the IdentityFile path to match path to generated private key and save the file:
    Host github.com
    	HostName github.com
    	User git
    	IdentityFile "~/Path/To/Private/SSH/key"
  5. Optionally, exclude files you do not want to be pushed to remote repository:
    1. Create .gitignore file: touch .gitignore
    2. Open the file: open .gitignore
    3. Supply linedivided array of excluded files and directories
    4. Sample file for ObjectiveC .gitignore file from GitHub is here: https://github.com/github/gitignore/blob/master/Objective-C.gitignore
    5. Finally, push last commited local changes to remote directory:
      1. in Xcode: Source Control → Push…
      2. in Terminal: git push u origin master

Further reading

Komentáre

blog/odborny/2015-07-08-integrating_xcode_project_and_github/assembla.txt · Posledná úprava: 2019/10/08 23:03 od Róbert Toth