XCode transfer problem to GITHUB

Hello guys, today I want to tell you about the problem and solution I have in my swift project.
As you know, github is an indispensable platform for developers, we can do many more operations such as sharing our projects with our friends within github, planning and managing our projects with other people.

Now, we will try to transfer the codes we will create in SwiftUI environment to GITHUB and after transferring it to githuba, the created content is empty and we will try to find a solution to this problem together.
If the same situation happened to you, I would like to help you with the sample solution method.

  1. First of all, let’s create any project in Xcode;

2. Let’s transfer our project to github, first we create a new repository on github.

3. Github has compiled and made ready the codes that we can use in the terminal according to the repository name we created.

4. At this stage, we will continue the process by transferring the codes in the command line section given to us to the terminal in order.

5. When we did the transaction at the terminal, we found that the content of the codes was not reflected in the github and the problem persisted when we pushed.

6. At this stage ;
We need to write the following codes to the terminal in order to solve the problem.
git add.
git commit -m ‘initial’
git remote add origin
git push oriin main

7. That’s all, friends, we have managed to transfer the project we created in Xcode to github without any problem.

I hope it will be a solution for those who have problems like me, I wish you all healthy days.

iOS Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store