git-history

How to remove commits from git history but otherwise keep the graph exactly the same, including merges?

喜欢而已 提交于 2020-07-03 03:58:37
问题 What I have: ---A----B-----C-----D--------*-----E-------> (master) \ / 1----2 (foo) What I need: ---A---------------D--------*-----E-------> (master) \ / 1----2 (foo) A while ago I made two commits I would like to remove from my git repo. I tried a variety of different rebasing "tutorials" and all of them ended in weird git histories, so I created an example repo, and the result is not what I expected. Can anyone help me to understand what I am missing? I have two branches, master and foo . I

How to remove commits from git history but otherwise keep the graph exactly the same, including merges?

大兔子大兔子 提交于 2020-07-03 03:58:08
问题 What I have: ---A----B-----C-----D--------*-----E-------> (master) \ / 1----2 (foo) What I need: ---A---------------D--------*-----E-------> (master) \ / 1----2 (foo) A while ago I made two commits I would like to remove from my git repo. I tried a variety of different rebasing "tutorials" and all of them ended in weird git histories, so I created an example repo, and the result is not what I expected. Can anyone help me to understand what I am missing? I have two branches, master and foo . I

Visual Studio extension - get reference to currently selected item in Git history

做~自己de王妃 提交于 2020-06-29 03:43:06
问题 I managed to get a custom button added to the Git history context menu thanks to the help offered here. I'm continuing work at the same extension and am again stuck. Once the button I've added to the context menu is clicked I need to get a reference to the commit that is selected when it is clicked. The idea is that I then need to grab the code changes associate with that commit. I've gotten as far as getting a reference to the ActiveWindow which has a caption of "History - master". Which

Connect git historys after cut

别说谁变了你拦得住时间么 提交于 2019-12-23 02:57:23
问题 My two repos are from the same project. I make a history cut after commit 3 and work now only with Repo ProjectnameWorking . git log Repo "ProjectnameArchiv": 30114b2afac5d1c5a968441151ee8f91fc015ff3 4 9aa472d04501a14b5b704fde32445461f99f539a 3 1d0e5abe5daf60c0d86819938ba1aefd44b87ff5 2 766f4880e8ccf61bdc718dfae62466f800ae8119 1 git log Repo "ProjectnameWorking": 2932c4b8ea681f0a97bf151ccc46d2044e8e5a50 5 27ec1a4618f1bf0025b8ba83fd69c2607cdf78d4 4 Is there a way to connect later both historys