I have code locally with No .git
folder.
I have code checked into a bitbucket repo.
I want to take steps to link my local folder to the master branch of my bitbucket repository, and push my code folder. In foreseeable cases, the two codebases will match. But if they don't, I want my current folder to just overwrite my bitbucket repo. Something like this:
cd ... my local code location ..
git init
git config user.name...
git config user.password...
git remote add ???? ...
git add *
git commit -m "Automated Push"
git push -u origin master
I have tried a few ways, but the main break is that I can't pull because I'm not tracking a branch, I can't commit because there are things to pull, or I can't push because rejected
, error: failed to push some refs...
Note: I do not know, care to know, or care to use the latest commit id. I don't mind brute forcing it.