A hacky solution:
git push # ensure that you push all your last commits from all branches, and
# take care about your stashes as well because we are going to delete
# everything.
cd ..
rm -rf online-shop
git clone --depth 1 git@github.com:giorgi-m/online-shop.git
This last line will clone the repository with only a one commit history.
Hence your .git
folder will be much lighter. However, you will not have the whole history on your computer and this may not be what you are looking for.
For other users that would like to clone your application, you can tell them in the README
file that they can fasten download by using the next command:
git clone --depth 1 git@github.com:giorgi-m/online-shop.git
Another solution, which is rewriting history, would be to remove all your remote history. You can see more about it in this answer:
Deleting the .git folder may cause problems in your git repository. If you want to delete all your commit history but keep the code in its current state, it is very safe to do it as in the following:
Checkout
git checkout --orphan latest_branch
Add all the files
git add -A
Commit the changes
git commit -am "commit message"
Delete the branch
git branch -D master
Rename the current branch to master
git branch -m master
Finally, force update your repository
git push -f origin master
PS: this will not keep your old commit history around