GIT , Remove all old changes and make Current as initial | Drupal 8

GIT , Remove all old changes and make Current as initial

Submitted by editor on Sun, 09/18/2016 - 11:10
Question

How to remove all git repository history and set the current state as initial commit ?

This is the brute-force method. It also removes the configuration of the repository.

Step 1: remove all history
rm -rf .git

Step 2: reconstruct the Git repository with current content
git init
git add .
git commit -m "Initial Commit"

Step 3: push to Git.
git remote add origin <git-uri>
git push -u --force origin master

Tags

Comments

Claudia Cape (not verified)

Mon, 08/24/2020 - 08:33

The tutorial is disputed for the attested and all shows for the citizens. Martins of the tutorials and https://www.dissertationhqhelp.com/ are shaped out for the flow of the offers. The skills are invited or the content of the tutorial for the listeners and readers by all means.

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.