git-rebase

How do I squash commits in git with a commit date that is not in the past?

社会主义新天地 提交于 2020-08-20 18:22:23
问题 So, I have a very simple use case; I want to squash all the commits that need to go back into master from my 'todays working' branch. Until now I've been using git rebase -i for this, but it doesn't work quite right; the timestamp on the final commit isn't right. Here's an example of doing this: [work1] git checkout master Switched to branch 'master' [work1] git rebase today First, rewinding head to replay your work on top of it... Fast-forwarded master to today. [work1] git log --pretty

How do I squash commits in git with a commit date that is not in the past?

本秂侑毒 提交于 2020-08-20 18:20:30
问题 So, I have a very simple use case; I want to squash all the commits that need to go back into master from my 'todays working' branch. Until now I've been using git rebase -i for this, but it doesn't work quite right; the timestamp on the final commit isn't right. Here's an example of doing this: [work1] git checkout master Switched to branch 'master' [work1] git rebase today First, rewinding head to replay your work on top of it... Fast-forwarded master to today. [work1] git log --pretty

Change the root commit parent to point to another commit (connecting two independent git repositories)

跟風遠走 提交于 2020-07-05 11:24:50
问题 I have a project that has more than 3 years of history in the svn repository. It was migrated to git, but the guy who did this, just take the last version and throw out all these 3 years of history. Now the project has the last 3-4 months of history in one repository, and I've imported the other 3 years of svn history into a new git repository. Is there some way to connect the root commit of the second repository into the last commit of the first one? It is something like this: * 2017-04-21 -

Change the root commit parent to point to another commit (connecting two independent git repositories)

梦想与她 提交于 2020-07-05 11:24:24
问题 I have a project that has more than 3 years of history in the svn repository. It was migrated to git, but the guy who did this, just take the last version and throw out all these 3 years of history. Now the project has the last 3-4 months of history in one repository, and I've imported the other 3 years of svn history into a new git repository. Is there some way to connect the root commit of the second repository into the last commit of the first one? It is something like this: * 2017-04-21 -