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 –

  • Why a file deleted and recreated on different location is shown as renamed file?
  • Error deploying to Azure through git (bitbucket hosted git repo)
  • Clone bitbucket repo to local machine failed
  • Redmine And Bitbucket Git
  • Composer create-project from bitbucket
  • android not able to commit on git
    • I have an existing Xcode project
    • I cd into the folder
    • I add my origin remote
    • I 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.

  • Repo Sync a particular folder
  • What is the best way to keep javascript libraries up-to-date in rails?
  • Git workflow: merging branches while avoiding repetitive commit messages
  • Git: how to exclude a subfolder in a repository?
  • Using variables assigned with heredoc content in a Bash script via Sed
  • Heroku: “No default language could be detected for this app” error thrown for node app
  • 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….
    I used git init and it worked!

    Git Baby is a git and github fan, let's start git clone.