Kutay Demireren
Kutay Demireren

Reputation: 650

Errors on Push on Git followed by errors on Pull and Workspace

I'm really new on git, and things are really complicated. I really need all of your help!

I don't know where is the mistake so I will tell my all story from the beginning. I was working on another computer, and were able to push without an issue. Then I changed to my current computer, so download from the web (which is visual studio btw) my project, directly with the download button. Then I start working on my new project. Yesterday, I tried pushed and it told me "Everything is up-to-date". Thought, didn't accept my push. I just nevermind yesterday and continue working. Today, I tried pushing again but I figured out I didn't commit yet. So from XCode, from to top bar I go for commit and then opened the terminal again. Tried to push one more time, but here my problem is started. Because of I was working cocoapods, I was working from .xcworkspace. With the push, I am now not able to open my project. It started giving me error "Workspace Integrity(Couldn't load project). Tried re-opening several times, but ofc, didn't work. So, I still assume that is because of the push and if I handle the push problem that will also fixed. To be able to push, I found that I need to pull then push. So I tried to pull, but that also gave me the error of being unmerged files. Then, I decided to figure out a way to merge, but those I found on the net, especially on stack, there are nothing worked for me.

Things are complicated for me then you thought, because I really don't know what is git at all and it just came up with all of these error. There are lots of errors and I'm really confused.

I really need someone to help me deeply, at least telling me a way to out.

Hope that long story don't scare you, as I am scared too.

Thanks from now,

Waiting for your guidance, desperately!

Upvotes: 0

Views: 61

Answers (1)

TheHuman Wall
TheHuman Wall

Reputation: 207

You should try issuing a git fetch, and then a git merge from the terminal. This is usually a better way than to use git pull. git status is your best friend too, it will show any files that have not been added to your staging area. If you have files that have not been added yet, you can either run a git add <filenames> or you can commit and add at the same time with

git commit -a -m "commit message"

Hope this helps at least a little.

Also, you definitely don't want to corrupt your remote repo, so don't push your local repo if it's bad. If your remote repo is still okay, you can clone it again, and add the changes that you made yesterday and today manually, not ideal, but it might be your only choice if you can't open your files.

Upvotes: 1

Related Questions