$ git init
Initialized empty Git repository in C:/Users/myname/IdeaProjects/ProjectName/.git
$ git remote add origin https://myname@bitbucket.org/abc/xyz-repository.git
$ git status
On branch master
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
.gitignore
.idea/
ProjectName.iml
generated-sources/
pom.xml
src/
nothing added to commit but untracked files present (use "git add" to track)
$ git add .
FEW WARNINGS...
$git commit -am "New Project"
$ git push -f origin master
Now every folder and file in the xyz-repository.git is replaced with the new files making a new master branch overriding the existing once, ALL commit ids are gone.
How can I revert all I have done? I want to go back to the previous master branch which has folders and files.