Git Push To New Repo Pushing Wrong Content
I tried creating a new repo on Bitbucket and pushing all of my code to it, but for some reason it is pushing another folder’s contents to the repo? I used
git status and saw that there were many other files that were untracked yet completely irrelevant.
Things that I done so far –
- I have an existing Xcode project
- I cd into the folder
- I add my origin remote
git push -u origin --all
- I go to Bitbucket and see that another folder of mine has been pushed up
If I use the command
ls in my directory, I see that only the files I need are there.
One Solution collect form web for “Git Push To New Repo Pushing Wrong Content”
Turns out I hadn’t initialized my git repository within that folder….
git init and it worked!