Questions tagged [git-history-rewrite]

23 questions
5
votes
2 answers

Concatenate two git repository histories

I want to combine a cvs and a svn repository into a new git repo, without loosing history of course. The catch is the svn repo is a direct continuation of the cvs repo historywise. Someone just created the svn repo and clumsily added the last…
mplwork
  • 1,120
  • 10
  • 21
3
votes
1 answer

Does Git leave any evidence that a rebase ever even occurred after the fact?

I understand that a rebase rewrites history. But is there any record or sign that a rebase occurred left in the repository after the fact?
BVernon
  • 3,205
  • 5
  • 28
  • 64
3
votes
4 answers

How to update my feature branch after a force push on the base branch . We only use rebase, merges are forbidden

We are working with a very simple structure in git. First we have our master branch. Below we have develop And finally we can have any feature branch We only use rebase for updating the history on our branches and then f-forwarding to the above…
2
votes
1 answer

Remove a number of files from old commits on specific remote branch of git repo (without having to push to master branch)

I work with a code base shared by a number of people and have a particular branch that is for my personal use only. I made a huge mistake and about 10 commits ago removed a particular file type from the git ignore and then pushed a number of files…
2
votes
1 answer

How to check what git rebase had changed?

Is there a way to check what git rebase had changed after doing the rebase and exiting rebase mode? I used rebase to change the author name of previous commits. While trying to do so, I rebased in wrong branch (i.e., master) which viewed to me in…
Salahuddin
  • 1,617
  • 3
  • 23
  • 37
1
vote
3 answers

Git filter-branch or filter-repo to update submodule gitlink?

I have git repository A that uses B as a submodule. B's history has been rewritten after an LFS migration, but I would love it if A could still have its entire history functional. After the LFS migration, I do have a mapping OldSHA1 > NewSHA1 for…
1
vote
1 answer

git Second Order History

When working on a patchest, I'm expected to provide a set of clean commits. Therefore I often find myself rewriting history repeatedly before my commit-set is clean and ready to be merged. In this process, after receiving comments from reviewers, I…
Amir Gonnen
  • 3,525
  • 4
  • 32
  • 61
1
vote
1 answer

How can I create a commit that rolls back another one?

For simplicity, let's create a repository with two commits only: mkdir somedir cd somedir git init echo hello > somefile git add somefile git commit -m 'first' echo world >> somefile git commit -am 'second' For clarity, at this point git log…
Enlico
  • 23,259
  • 6
  • 48
  • 102
1
vote
2 answers

How to move git commits common to multiple branches earlier in the main branch history?

I have a git repo that looks like this: /C''-D''-F (featureB) A-B-C---D---E (main) \C'--D'--G (featureA) I would like to move the common commits C and D earlier in the main branch history so that the repo looks like this: /F…
1
vote
1 answer

Collapse git history to tags (combine commits between tags)

We have a fairly big (1000+ commits) repository with 7 years worth of changes and 6 released versions (each version represented by a git tag). We would like to collapse the history so that prior to last tag, all commits between two tags are…
mmix
  • 6,057
  • 3
  • 39
  • 65
1
vote
1 answer

How to get all git commits with libgit2sharp, regardless the branch?

AFAIK, Repository.Commits property return all commits reachable from current branch. I would like to get all possible commits, regardless the branch. I am using the following command : var commitsToRewrite = repository.Branches.SelectMany(x =>…
tigrou
  • 4,236
  • 5
  • 33
  • 59
1
vote
1 answer

Git history duplicated, is squashing commits possible?

Help: Git History Duplicated (O_O) I tried to get ride of a file which contains an API key so researched about the remove a file from git history and used the command provided here: https://youtu.be/Bo-8EfDpKxA I used the commands git filter-branch…
Dom is Coding
  • 305
  • 4
  • 12
1
vote
0 answers

Not able to clear git history in Remote by BFG Repo Cleaner

I tried to delete one file from git history. I am able to delete that file from local and did the forsce push for all branches my cli are: java -jar bfg-1.13.1.jar --delete-files "{config.js}" --no-blob-protection my-repo.git git reflog expire…
jiz
  • 308
  • 3
  • 7
1
vote
1 answer

Take history from one repository change author information and push to another repository

We have two repositories, 1. source repository 2. target repository When a commit comes in the source repository, I need to change the author name and author email then push to the target repository. I have tried the solution from this link but it…
0
votes
0 answers

Delete/Squash old commits while keeping the changes that they introduced

I'm trying to delete/squash a bunch of old commits that I don't want on my git history which were just made to put together code from multiple locations that were not using git (local folders from other programmers) This is how the actual git…
Girog
  • 1
  • 2
1
2