I try to explain my problem. Bevor 2015 we had one big SVN repository, then someone think it will be good to move or copy some projects into a smaller repository. Now we start to go from SVN to GIT and on converting the repository and the history in GIT starts on the day when the projects are moved or copied. Because we need also the old history, I search and found that it would be possible to merge the history of the new repository with the history of the old repository. For this I use “git replace” to replace the first history entry in the new repository with an entry from short before of the history from the big repository, that was the source for the new history. This work and I only lost the first entry of the new repository and the last before the project are moved from the old history. But now I have the history for all projects that ever was in the big repository and the GIT repository is now very big. Is there any way to delete history and all-around of projects that will not be in this repository? Thanks for your help!
Git remove history information from other repositories?
105 Views Asked by ThinkmanTP At
1
There are 1 best solutions below
Related Questions in GIT
- problem to push files on a repository git
- diff3 output in git conflict style, including mergeable hunks
- Git Not In Sync with Local Branch
- Setting up the version control of .dotfiles while the .config is connected to a forked repo
- How to fix overriding the main branch in Git?
- I can't add text to "Message" in VS Code when committing to Git
- How can i redirect pull request from main branch to another branch
- Xcode commits (possibly outside of any branch) disappeared, how to get them back?
- Git/TortoiseGit : how to apply ONLY the changes from ONE commit from branch A, to branch B?
- How can I reintroduce username an password on git using fedora?
- GIT SKIP EMPTY DIRECTORIES
- Git smudge run once per checkout or per commit?
- I can't find ~/.profile or ~/.bashrc in C:/Users/<user>/.ssh folder
- Set environment variable during push for GitHub Actions
- Android WebRTC compile
Related Questions in REVISION-HISTORY
- `git -S` doesn't find all commits
- CouchDB Fauxton - How to navigate through revisions history?
- django data history/auditing
- ClearCase to Git migration
- With Mercurial, how do you hg log a branch with cross-branch ancestors?
- Versioning concept in couchbase
- How to remove a file at the origin of multiple branches from the git history?
- Git remove history information from other repositories?
- Google Docs like revisioning?
- How do subversion clients deal with a historic change in a repository?
- Revert to specific version of Google sheets with respect to specific date using Google Apps Script
- Separating git commits for private and public
- Get list of revision ids ONLY
- How did such-and-such commit reach me?
- How can I view file history in Git?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Yes. Usually removing things from a repository is very problematic but since you just started using it (so there are probably few clones or references to the current commits around) that is probably your best option.
You could use
rebase --interactiveand edit the history the way you want, but actually since you just started using that repository you should probably take the chance to take out thatreplace(which is a potentially problematic hack) as well.So you should probably start afresh re-converting the repository taking only (and all) the commits you want.
If you are not familiar with this stuff you'd better find someone who is to make the conversion, you're already going to have your standard fuck-ups in your process of learning git, if you also start with a messed-up repository you're looking for a hellish experience in the coming months and years.
If on the other hand you've already done significant new work on the git repository and you don't want to change that history, all right, keep it and re-convert only the old history.
Then delete the previous
replaceand add a new one to link the re-converted history.Note that you don't need to lose any commit when using replace. Look better into it or ask someone more experienced to do it. I don't want to make an extensive step-by-step explanation here, but you basically have to replace the first commit of the more recent part of the history with an identical copy of it except with its parent edited to be the last (most recent) commit of the older history (this after you imported the objects of the older history in the newer repository, of course).