Session 411 - Source Control Management in Xcode

download Session 411 - Source Control Management in Xcode

of 122

Transcript of Session 411 - Source Control Management in Xcode

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    1/122

    These are confidential sessionsplease refrain from streaming, blogging, or taking pictures

    Session 411

    Eric DudiakXcode Software Engineer

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    2/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    3/122

    Introduction

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    4/122

    Introduction

    Committing

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    5/122

    Introduction

    Committing

    Sharing your code

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    6/122

    BackupCollaboration

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    7/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    8/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    9/122

    Subversion Git

    Server

    Local Working Copy

    Server

    Local Working Copy

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    10/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    11/122

    Editing

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    12/122

    Editing

    Viewing history

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    13/122

    Editing

    Viewing history

    Managing repositories

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    14/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    15/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    16/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    17/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    18/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    19/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    20/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    21/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    22/122

    Comparison

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    23/122

    Blame

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    24/122

    Log

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    25/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    26/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    27/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    28/122

    Subversion

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    29/122

    Subversion

    Root

    Trunk

    Branches

    Tags

    ...

    ...

    ...

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    30/122

    Subversion

    Root

    Trunk

    Branches

    Tags

    ...

    ...

    ...or

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    31/122

    Subversion

    Root

    Trunk

    Branches

    Tags

    ...

    ...

    ...

    Root

    Project 1

    Trunk

    Branches

    Tags

    ...

    ...

    ...

    Project 2

    Trunk

    Branches

    Tags

    ...

    ...

    ......

    or

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    32/122

    Demo

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    33/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    34/122

    Edit

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    35/122

    Edit

    View history

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    36/122

    Edit

    View history

    Manage repositories

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    37/122

    Kevin LindemanXcode Software Engineer

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    38/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    39/122

    Source control for new projects

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    40/122

    Source control for new projects

    What is new while committing

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    41/122

    Source control for new projects

    What is new while committing

    Ignoring files

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    42/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    43/122

    Managing your project with source control

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    44/122

    Managing your project with source control

    Configuring remotes

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    45/122

    Managing your project with source control

    Configuring remotes

    Pushing changes

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    46/122

    Demo

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    47/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    48/122

    Placing your project under source control

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    49/122

    Placing your project under source control

    Configuring remotes

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    50/122

    Placing your project under source control

    Configuring remotes

    Pushing changes

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    51/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    52/122

    Better change detection

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    53/122

    Better change detection

    Skip or discard individual changes

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    54/122

    Better change detection

    Skip or discard individual changes

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    55/122

    Better change detection

    Skip or discard individual changes

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    56/122

    Better change detection

    Skip or discard individual changes

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    57/122

    Better change detection

    Skip or discard individual changes

    Commit to a new branch

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    58/122

    Better change detection

    Skip or discard individual changes

    Commit to a new branch

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    59/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    60/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    61/122

    Master

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    62/122

    MasterBranch

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    63/122

    Master

    Branch

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    64/122

    MasterBranch

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    65/122

    MasterBranch

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    66/122

    MasterBranch

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    67/122

    Demo

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    68/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    69/122

    Better change detection

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    70/122

    Better change detection

    Skip or discard individual changes

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    71/122

    Better change detection

    Skip or discard individual changes

    Commit to a new branch

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    72/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    73/122

    Why?

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    74/122

    Why?

    What to ignore?

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    75/122

    Why?

    What to ignore?

    What if I committed those already?

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    76/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    77/122

    Finder settings

    .DS_Store

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    78/122

    Finder settings

    .DS_Store

    Window geometry

    UserInterface.xcuserstate

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    79/122

    Finder settings

    .DS_Store

    Window geometry

    UserInterface.xcuserstate

    Private schemes and breakpoints

    *.xcuserdatad

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    80/122

    Used to run Xcode command line tools

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    81/122

    Used to run Xcode command line tools

    Used to run Xcode command line tools

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    82/122

    git

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    83/122

    git

    Per-repository

    Place a .gitignore file at the root of your git working copy

    .DS_Store

    UserInterface.xcuserstate

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    84/122

    git

    Per-repository

    Place a .gitignore file at the root of your git working copy

    .DS_Store

    UserInterface.xcuserstate

    Globally

    Create~/.gitignore_global

    xcrun git config --global core.excludesfile ~/.gitignore_global

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    85/122

    Subversion

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    86/122

    Subversion

    Globally

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    87/122

    Subversion

    Globally

    Edit ~/.subversion/config

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    88/122

    Subversion

    Globally

    Edit ~/.subversion/config

    Add or modify theglobal-ignoressetting

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    89/122

    Subversion

    Globally

    Edit ~/.subversion/config

    Add or modify theglobal-ignoressetting

    global-ignores = .DS_Store UserInterface.xcuserstate

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    90/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    91/122

    In Terminal

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    92/122

    In Terminal

    cd

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    93/122

    In Terminal

    cd

    xcrun [git|svn] rm

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    94/122

    In Terminal

    cd

    xcrun [git|svn] rm

    xcrun [git|svn] commit -m Removing unneeded files

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    95/122

    In Terminal

    cd

    xcrun [git|svn] rm

    xcrun [git|svn] commit -m Removing unneeded files

    Setup ignore files

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    96/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    97/122

    Source control for new projects

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    98/122

    Source control for new projects

    What is new when committing

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    99/122

    Source control for new projects

    What is new when committing

    Ignore files

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    100/122

    Eric DudiakXcode Software Engineer

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    101/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    102/122

    Pull and update

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    103/122

    Pull and update

    Merging branches

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    104/122

    Pull and update

    Merging branches

    Resolving conflicts

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    105/122

    Pull and update

    Merging branches

    Resolving conflicts

    Push

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    106/122

    Branch

    Local Remote

    Branch

    Master

    Master

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    107/122

    Branch

    Local Remote

    Branch

    MasterMaster

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    108/122

    Branch

    Local Remote

    Branch

    Master

    Master

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    109/122

    Branch

    Local Remote

    Branch

    Master

    Master

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    110/122

    Branch

    Local Remote

    Branch

    Master

    Master

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    111/122

    Local Remote

    Master

    Branch

    Branch

    Master

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    112/122

    Local Remote

    MasterBranch BranchMaster

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    113/122

    Demo

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    114/122

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    115/122

    Work with multiple repositories

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    116/122

    Work with multiple repositories

    Resolve conflicts

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    117/122

    Work with multiple repositories

    Resolve conflicts

    Update

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    118/122

    Work with multiple repositories

    Resolve conflicts

    Update

    Merge

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    119/122

    Work with multiple repositories

    Resolve conflicts

    Update

    Merge Push

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    120/122

    Michael JurewitzDeveloper Tools [email protected]

    Apple Developer Forums

    http://devforums.apple.com

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    121/122

    Xcode Lab Developer Tools LabOngoing

  • 7/28/2019 Session 411 - Source Control Management in Xcode

    122/122