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
337
questions
-1
votes
1
answer
34
views
How to undo a <history change> push in git? [duplicate]
After a month of working on a personal project, I realized I was using an invalid user.name and user.email so I changed it properly and everything was set right until the last commit done 2 months ...
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 ...
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 ...
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 ...
0
votes
2
answers
142
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....
0
votes
0
answers
97
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, ...
0
votes
1
answer
97
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 ...
0
votes
0
answers
42
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 ...
-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":...
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)$...
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 ...
1
vote
1
answer
334
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 ...
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.
...
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 ...
1
vote
2
answers
120
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 ...