xCode 6 and Gerrit

Gerrit is an open soure code review tool that uses Git. Gerrit handles pushes a little different. Today we are going to walk through using Gerrit with xCode 6.

This guide will only focus on the xCode / OSX side and assumes that a Gerrit project is already configured.

Add public ssh key to Gerrit

Check for Existing ssh keys

ls -al ~/.ssh

Note that you may have to change id_rsa.pub to whatever you found in previous step

pbcopy

Add public key to Gerrit

Log into Gerrit Go to your user settings Click SSH Public Keys Click Add Key Paste in the key from previous step Click Add

Checkout Project in xCode

Go to Source Control -> Checkout Enter repository location Click Next Select location for files Click Checkout

xCode will now do some Git magic. After a minute or so you will have the project ready to use.

Commit Changes in xCode

Click Source Control Select Commit Review Changes Enter concise meaningful commit message Do NOT check push to remote Click commit x file

Push changes to Gerrit via command line

Verify git status

In project folder run git status to be sure the commit was successful

Push commit to Gerrit for review

git push origin HEAD:refs/for/master

Author

Casey Garland


Originally published at www.parsed.io.

Copyright © 2020.