Skip to main content

Questions tagged [git-rewrite-history]

Rewriting the history of a Git repository, for example to edit old commits, remove unwanted data (e.g. private data or large files), rearrange file structure, fix commit metadata, etc.

git-rewrite-history
0 votes
1 answer
38 views

git reorganize pull request (e.g. into one commit per file)

I'm working on a project where I have a pull-request of another contributor that contains quite a number of commits (>15), some with really minor changes. In essence, the pull-request boils down to ...
Honeybear's user avatar
  • 3,098
0 votes
1 answer
26 views

How to split SVN repo to multiple git repos with history of moved files

This is another story about the conversion of a Subversion repository into multiple git repositories. But the question is not about how to do that in general but instead, how to keep the history of ...
David's user avatar
  • 153
0 votes
1 answer
38 views

Remove original git history for specific remote repository, but keeping it else

For my current project my project partner requires to sync my code not only with my git-server based on gitlab, but also with his git-server (unknown base). However, I don't want to expose all history ...
arc_lupus's user avatar
  • 4,086
0 votes
2 answers
133 views

How to remove personal email from git commits after PR has been merged?

On GitHub I've successfully opened a PR on a public repository, which has been recently merged: My Pull Request (#25) * Feature 1 * Feature 2 * Bump version --------- Authored-by: My Username <my....
Nauel's user avatar
  • 485
0 votes
0 answers
92 views

How to use git filter-repo to rewrite history in a Gitlab repository that uses git LFS?

I have a private Gitlab repository that I want to make public, but some of the people who have worked on it don't want their names/Gitlab accounts to be visible there. I wanted to scrub their names, ...
Red's user avatar
  • 425
0 votes
1 answer
96 views

How to delete one commit completely from Github?

I have some orphaned commits accidentally committed to GitHub. Following this QA answer,I use git reflog expire --expire-unreachable=now --all to remove them from git rev-list --all. (I tried use git ...
An5Drama's user avatar
  • 377
0 votes
0 answers
41 views

How Can I Convert Tabs To Spaces Using Rebase?

A colleague accidentally committed a large number of changes with tabs instead of spaces. I want to rebase and amend that commit and change all the tabs to spaces. I don't want to change all the tabs ...
opticyclic's user avatar
  • 7,936
-1 votes
1 answer
71 views

Rewrite one line in one file in entire git history using git filter-repo

Just as the title says. Specifically, I want to change the value of a JSON file in the entire history of my git repo like { ... "FOO": "yes" ... } to { ... "FOO":...
geckels1's user avatar
  • 526
0 votes
0 answers
50 views

How to redirect from non eng to /eng/ in url path I am getting redirect loop (Right now in localhost but need both live and local)

Thank you for your time. I have done almost everything but I am stuck here in the redirect part Here is my full .htaccess code RewriteEngine on RewriteCond %{REQUEST_URI} !\.(css|js|jpg|jpeg|png|gif)$...
Aritra 's user avatar
0 votes
1 answer
57 views

How can I insert extra commits using git replace?

What I'm trying to do is add one or more extra commits in between two other historical commits. I could do this with git rebase however this only works in simple cases - it is completely unpractical ...
Chris Stryczynski's user avatar
1 vote
1 answer
328 views

How to "add" the history of a previous git repo to a new one?

So, I had this repo on a GitHub account, and also stored in local on the PC. At a certain point I deleted the account and made a new one. I created a blank repo on the new one, picked the local files ...
hammon5tl's user avatar
2 votes
0 answers
80 views

Amending commit messages with git rebase when there are merge conflicts

There are an enormous number of good web guides on how to amend old commit messages with git rebase. In my case this is essential as the hooks won't let me push remotely without changing the message. ...
Paul Epstein's user avatar
0 votes
0 answers
20 views

Git: Change authors through history [duplicate]

I work on a shared lab system with another person on a project. We have both been working on a project so we use the same user on the machine, but we are testing different parts of a code so we each ...
Mridul Gupta's user avatar
1 vote
2 answers
117 views

Rewrite history to remove all additions of lines matching a certain pattern

I have a range of commits in a C++ codebase. I added a particular include in a set of files that I want to undo for the whole range of commits. Is there any way of automatically going through the list ...
Alexander Torstling's user avatar
1 vote
2 answers
124 views

Putting unrelated histories behind each other

For some reason (due to complicated conversion from SVN) I have two Git repositories: git repo A contains all history up to 31st December 2021 git repo B contains all history from 1st January 2022 on ...
J Fabian Meier's user avatar

15 30 50 per page
1
2 3 4 5
23