git - resetting a remote repository
It can sometimes be useful to remove the commit history for a project that is under git. and basically make the latest state be the first commit. An example use case might be when uploading to github.
However, if other folk are using the bare repo, then you need to let them know what you are doing.
The process is not at all complex. But first, ensure you have a backup copy of your project somewhere safe.
cd project_directorymv .git/config ~/saved_git_configrm -rf .gitgit initgit add .git commit -m 'Initial commit'mv ~/saved_git_config .git/configgit push --force origin masterIf you instead, or also, want to push to github (or somewhere else) then do something like this:
git remote add github git@github.com:github_user_name/github_project_name.gitgit config branch.master.merge refs/heads/mastergit push -u github master