Perhaps the easiest way is to just create a new repository with current state of the working copy. If you want to keep all the commit messages you could first do git log > original.log
and then edit that for your initial commit message in the new repository:
rm -rf .git git init git add . git commit
or
git log > original.log # edit original.log as desired rm -rf .git git init git add . git commit -F original.log
Related Posts:
- Squash my last X commits together using Git
- Undoing a git rebase
- Undoing a git rebase
- Git refusing to merge unrelated histories on rebase
- How to modify existing, unpushed commit messages?
- Handling file renames in Git
- Delete commits from a branch in Git
- Why are there two ways to unstage a file in Git?
- ‘git’ is not recognized as an internal or external command
- ‘git’ is not recognized as an internal or external command
- How to remove origin from git repository
- What’s the purpose of git-mv?
- git : Pull is not possible because you have unmerged files
- Why git asks to enter a commit message to explain why this merge is necessary
- How to cherry-pick multiple commits
- How do I remove version tracking from a project cloned from git?
- How to cherry-pick multiple commits
- How to git rebase a branch with the onto command?
- How do I remove version tracking from a project cloned from git?
- git pull on a different branch
- Download a specific tag with Git
- What does ‘git remote add upstream’ help achieve?
- Git push won’t do anything (everything up-to-date)
- git add . -> still “nothing to commit” with new files
- git submodule add error: does not have a commit checked out
- Git error on git pull (unable to update local ref)
- git status shows modifications, git checkout —
doesn’t remove them - How to resolve git’s “not something we can merge” error
- How to clone all remote branches in Git
- Update Git branches from master
- How to interactively (visually) resolve conflicts in SourceTree / git
- How can I delete all of my Git stashes at once?
- Your branch is ahead of ‘origin/master’ by 3 commits
- git add only modified changes and ignore untracked files
- Remove node_modules from git in vscode
- What’s the use of the staging area in Git?
- Rebasing remote branches in Git
- git push –force-with-lease vs. –force
- How can I move a tag on a git branch to a different commit?
- How to modify a specified commit?
- What firewall ports need to be open to allow access to external git repositories?
- How do I prevent apache from serving the .git directory?
- Git error: “Please make sure you have the correct access rights and the repository exists”
- What is a Memory Heap?
- 403 Forbidden vs 401 Unauthorized HTTP responses
- Advanced AREL or just Rails Query for has_many through search by association
- How to resolve merge conflicts in a Git repository
- “If not” condition statement in python
- How can I sort a dictionary by key?
- What does ERR_SPDY_PROTOCOL_ERROR mean in nginx?
- pagebreak in markdown while creating pdf
- Create a tag in a GitHub repository
- How can I delete a file from a Git repository?
- Git: Could not resolve host github.com error while cloning remote repository in git
- Make an existing Git branch track a remote branch?
- Time Complexity of Prims Algorithm?
- What is the difference between ‘git pull’ and ‘git fetch’?
- Pull request vs Merge request
- What is the difference between `git merge` and `git merge –no-ff`?
- What’s the difference between & and && in MATLAB?
- azure error 502 – Web server received an invalid response while acting as a gateway or proxy server
- What is a Ray ID (Cloudflare)?
- What is the definition of a “disparity map”?
- ! [rejected] master -> master (fetch first)
- Alternative to ui-grid(doesn’t support angular2/4)
- How to git add a whole folder
- Tool for drawing parse trees?
- git: fatal unable to auto-detect email address
- pip install -r requirements.txt [Errno 2] No such file or directory: ‘requirements.txt’
- R error which says “Models were not all fitted to the same size of dataset”
- “git checkout
” is changing branch to “no branch” - simple IPython example raises exception on sys.exit()
- How to get a minecarft session ID?
- Factory Pattern. When to use factory methods?
- How to send a PUT/DELETE request in jQuery?
- How do I list all of the files in a commit?
- Python: What OS am I running on?
- ER-Diagram: Ternary Relationship – How to read properly?
- How can I diff 2 files while ignoring leading white space
- Converting time stamps in excel to dates
- The name ‘InitializeComponent’ does not exist in the current context
- Java: Not a statement
- Passing a hexadecimal value into a module in Verilog
- Difference between git stash pop and git stash apply
- How do I show the changes which have been staged?
- Setup for WordPress + Plesk + Git + Local Environment
- Is Git/GitHub a good WordPress deployment solution?
- Getting Started with Subversion, Git, or similar Version Control System to keep a History of my Files? [closed]
- How can I trash multiple posts at once from the front end?
- Why Does Automattic use SVN for WordPress Instead of Git?
- How to get a value from wp_dropdown_user?
- Customized Essay Writing Service
- WordPress, GIT, Renamed Plugin Dir + files – Working Code now Broken [closed]
- How to reload screenrc without restarting screen?
- How long before an s3 bucket can be created with same name after deletion?
- Software vs hardware RAID performance and cache usage
- How do high traffic sites service more than 65535 TCP connections?
- Using variables in Apache config files to reduce duplication?
- How to unify package installation tasks in ansible?
- Private IP address in public DNS