0

Long story short, I am starting a new git on a project with files I copied from an old project. When I start a new remote with github it doesn't sync the entire contents of the project, only one old commit that I made before copying over the file. When I try to sync the rest of the missing files in Xcode it says "no version editor".

On closer inspection, what's going on is the git that's created is only for the Pods folder and not the project folder. That's has something to do with this old commit that was trying to update the pods.

How can I remove that old commit so hopefully all the files sync? Or should I be going about this another way completely?

I've been going around in circles for a couple of days because of a pods update that didn't properly sync with gitHub. Any and all ideas are appreciated!

Ben
  • 3,346
  • 6
  • 32
  • 51

2 Answers2

1

I am not sure if I understand what you are asking for. Are your new files not showing up in version control? If that is the case I would first make sure all of the files are added to the repo.git add . and if that is still an issue I would check your .gitignore file.

If you are just wanting to restart and make a new repo you could also just delete the .git folder. And run git init

Lastly, if you are attempting to remove a commit there is a post about that here. Delete commits from a branch in Git

m10653
  • 33
  • 9
  • 1
    Good ideas but the problem is the git that's created is only in the Pod folder because that's what the old commit was for. I have no idea why it's doing this when I setup the git. I'm looking to delete what Xcode thinks is a commit so when I setup the git in the first place it doesn't do this strange setup. – Ben Apr 22 '19 at 17:17
1

you mean you want to delete last commit or what? if last commit use this

git reset --hard HEAD^

or you check your branch status using first using

git status

so you can know what your files your edit.

vrie
  • 446
  • 4
  • 8
  • 1
    Not exactly. The problem is the git that's created is only in the Pod folder because that's what the old commit was for. I have no idea why it's doing this when I setup the git. I'm looking to delete what Xcode thinks is a commit – Ben Apr 22 '19 at 17:16
  • 1
    careful, it will delete the commit and all changes in project that was in that commit. you will lost all latest changed code. – Nalov Aug 13 '20 at 06:49