-2

I already have files in project folder on server. I initialize there git:

git init

then i set up remote origin

git remote add origin git@bitbucket.org:xxxx

and ssh keys. Now i want to replace that old files by new files in remote repository. Which command i should use?

I tried

git pull origin master

but its not making any changes, and when i making:

git checkout master

its says:

error: The following untracked working tree files would be overwritten by checkout: I tried that before and it works fine, now i dont have idea what i did wrong)

 git checkout .

gives error too:

git checkout .error: pathspec './' did not match any file(s) known to git.

Eugene
  • 905
  • 1
  • 10
  • 22
  • i dont want to push, its old version on server where i making this commands.. – Eugene Sep 18 '13 at 13:14
  • Looks like you're trying to _force pull_, as described by [this question](http://stackoverflow.com/questions/1125968/force-git-to-overwrite-local-files-on-pull) –  Sep 18 '13 at 17:58

1 Answers1

1

Try something like this:

git fetch
git stash
git checkout -b master origin/master
git stash pop

Maybe at this point you can find some conflicts

Adrià Cidre
  • 392
  • 3
  • 3