简体   繁体   中英

How do I set up Xcode source control so that my repository can be accessed by two MacBooks?

I have managed to set up Source Control locally on my MacBook (let's call it MacBook1) without any problems.

I would like to set up another MacBook (MacBook2) to access the same repository (the one stored locally on MacBook1). Basically I want both machines to be able to work on the same project at the same time and use MacBook1 as the Git repository and source control server (for lack of a better term).

I've tried clicking on my Wi-Fi status icon and Create Network , but when I do this I can no longer access the internet through Wi-Fi. Also my Git folder for my project is a hidden folder and I cannot seem to select it for sharing.

How can I share my MacBook1 local Git repository across 2 machines?

If you want to keep the repo private then use bitbucket.org , however if you want to make it public then use github.com .

I use bitbucket even though I only generally use one Mac for development as I figure their data handling standards are better than mine and I am less likely to lose data due to disk crashes etc.

You basically create an empty repo on bitbucket and then in your local working repo, do:

$ git remote add origin https://bitbucket.org/YourName/YourRepo.git
$ git push --all
$ git push --tags

(I am not associated with Atlassian).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM