git-filter-branch Questions

3

I would like to merge multiple Git repositories (let's say repoA and repoB) into one new repository. The new repository (repoNew) should contain each repoA and repoB in a separate subdirectory. Sin...
Sitting asked 4/3, 2014 at 11:2

42

Solved

42

Solved

3

Solved

What command(s) can I use to find empty commits in a git repository, i.e. the commits that would be removed by git filter-branch --prune-empty?
Ogilvie asked 31/10, 2014 at 21:40

13

Solved

I added over 9000 photos by accident to my project folder. And committed them. Then deleted them from disk. Committed. Now I try to push changes to git server. But it takes too long and tries to ...
Curvet asked 23/8, 2014 at 4:0

2

Solved

We need to add some file in a specific past commit on a repo and we are ready to rewrite history so it affects to all branches diverging from that commit's children. We are trying to use git filter...
Aleta asked 15/1, 2019 at 13:14

3

I'm trying to split a subproject off of my git repository. However unlike in Detach (move) subdirectory into separate Git repository I don't have it in it's own subdirectory (and moving it in and d...
Cryptogam asked 20/5, 2012 at 18:42

4

Solved

I'm splitting out a Git repository using the --subdirectory-filter option of filter-branch which is working great except it pulls everything up to the root of the repository. I currently have ABC...
Kiefer asked 12/9, 2011 at 3:46

7

Solved

I've always used an interface based git client (smartGit) and thus don't have much experience with the git console. However, I now face the need to substitute a string in all .txt files from histo...

4

Solved

There's an old commit in my local repository which added some files, including one called "unwanted.txt". In subsequent commits, that file has been modified, along with others. Is it possible to co...
Voiceful asked 8/9, 2015 at 9:59

6

Solved

I have cleaned up our Git repository quite a bit, we need to remove big parts from the history. I do this using: git filter-branch --prune-empty --tree-filter 'rm -rf some_stuff' The --prune-emp...
Psychosurgery asked 21/3, 2012 at 11:3

12

Solved

I would like to put a Git project on GitHub but it contains certain files with sensitive data (usernames and passwords, like /config/deploy.rb for capistrano). I know I can add these filenames to ...
Hertfordshire asked 16/5, 2009 at 14:49

11

Solved

This question is based on Detach subdirectory into separate Git repository Instead of detaching a single subdirectory, I want to detach a couple. For example, my current directory tree looks like...
Carvalho asked 5/6, 2010 at 20:51

13

Solved

I'm afraid I couldn't find anything quite like this particular scenario. I have a git repository with a lot of history: 500+ branches, 500+ tags, going back to mid-2007. It contains ~19,500 commit...
Pace asked 23/12, 2010 at 3:7

4

Solved

Let's say I have a repo that includes this directory structure: repo/ blog/ _posts/ some-post.html another-file.txt I want to move _posts to the top level of the repo, so the structure will ...
Pankhurst asked 29/6, 2010 at 15:54

3

I have PGP key that let's me sign the commits via git commit -S. To sign my last commit I did a git commit -S --amend --no-edit and it signed my commit. Now, I want to sign all the commits that ar...
Grieg asked 9/4, 2016 at 4:45

2

Solved

In the past I've used git filter-branch to remove files from my git history. Following that, I can do a force push to update the remote repository. For example, removing all HTML files from the loc...
Andrej asked 25/2, 2021 at 17:37

1

Solved

I have a project with a structure like this: src/ scripts/ db/ other_stuff/ even_more_stuff/ file1 file2 file3 This repository needs to be split up. Folders db and scripts need to be split out int...
Encarnacion asked 12/11, 2021 at 17:13

6

Solved

I have a Git repo converted from SVN to Mercurial to Git, and I wanted to extract just one source file. I also had weird characters like aÌ (an encoding mismatch corrupted Unicode ä) and spaces in ...
Accelerate asked 11/9, 2011 at 0:19

2

Was searching throw SO for an answer to this. Came across this older thread which didn't seem to give any answers. Retriggering this thread hoping someone may know! Can someone tell me the differ...
Beaded asked 3/8, 2016 at 5:36

6

Solved

I am trying to format an entire repo using a code formatter tool. In doing so, I want to keep information about who committed which line, so that commands like git blame still show the correct info...
Ricardaricardama asked 27/11, 2018 at 15:13

26

Solved

I have a Git repository which contains a number of subdirectories. Now I have found that one of the subdirectories is unrelated to the other and should be detached to a separate repository. How ca...
Pilliwinks asked 11/12, 2008 at 13:57

3

Solved

I have inherited of a git repository with a null sha1 for a commit entry in a tree, preventing FishEye to index the repository. $ git fsck Checking object directoriies: 100%(256/256), done. warnin...
Residuum asked 12/6, 2014 at 12:0

2

When rewriting the history by git filter-branch --tag-name-filter cat … either by using --prune-empty and/or --subdirectory-filter=… you'll get into the case, that the commits that where tagged are...
Spaceless asked 11/8, 2017 at 10:3

3

I have a project under git. One day I moved all project files from current directory to foo/bar/ under the project. I did it using git mv. Then I added some more files and did some changes to alrea...
Indiscriminate asked 28/10, 2010 at 12:18

© 2022 - 2025 — McMap. All rights reserved.