Integration of projects into a single project

I have the same xcode project on two pending macbooks with different code. We need to combine this code, but we are not using any git account. We need to combine the same file, I mean that we have the same viewcontroller and two people are added to add code to the single view controller. How can I combine it. For instance:

I have a view controller. The name is “XYZ” and Person 1 is added by “Login Method” to “XYZ”, and person 2 is added by “Registration Method” in XYZ. and both codes are on a deferent macbook without any git account, how can I mergewhat.

+4
source share
2 answers

Since you use the git tag, I will provide you with a way to control git versions. First, write down bitbucket (free for a private repository) or github (only for a public repository). And create a repository. They are like a remote git repository (repo).

Then use git bash for the local repository.

On a single macbook, follow these steps:

  • git clone <URL for your bitbucket or github repo>
  • cd reponame
  • copy the xcode project to the reponame folder
  • git add .
  • git commit -am 'code version from first macbook'
  • git push

Now the code in the first macbook is placed in your remote repo.

On another macbook, follow these steps:

  • In an empty folder use git init
  • copy the xcode project in this folder
  • git add .
  • git commit -am 'code version from second macbook'
  • git remote add origin <URL for your bitbucket or github repo>
  • git pull origin master
  • Now code from macbook1 merges into macbook2
  • , , git add . git commit -m 'solve merge conflict'.
  • , macbooks. git push.

git, git book.

+1

. - , . , git, , .

0

Source: https://habr.com/ru/post/1664279/


All Articles