Housam,

I am a front-end and a user-experience developer with an MSc in Software Engineering and a Bachelor in Linguistics. I started as a Graphic Designer and a Web Designer in 1998 and started focusing on Web Development in 2008. Through my years of business experience, I learned a lot about Business Development, Marketing, Management, Entrepreneurship, and I worked on projects for big companies.

I am passionate about creating beautiful designs for print and for the web, and the happyness I pursue doing this.

My latest updates and blog posts

Delete All Commit History in Github

Written on November 30, 2017 in Technology | 1 min read

I was wondering if I can delete all commit history in Github, especially for those newly published projects that you commit six times to fix a comma in the README.md file.

Apparently, deleting the .git directory is a terrible idea, because that creates many problems in your repository.

The best solution is to check out a new branch, add all files to it, commit, delete the master branch, and then rename the new branch to master.

Steps to do that:

  1. Checkout
    git checkout --orphan latest_branch

  2. Add all the files
    git add -A

  3. Commit
    git commit -am "message"

  4. Delete the master branch
    git branch -D master

  5. Rename the current branch to master
    git branch -m master

  6. Finally, force update your repository
    git push -f origin master


Back to top