Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad commits in "master" history #1631

Closed
dsyme opened this issue Oct 17, 2016 · 1 comment
Closed

Bad commits in "master" history #1631

dsyme opened this issue Oct 17, 2016 · 1 comment

Comments

@dsyme
Copy link
Contributor

dsyme commented Oct 17, 2016

Some bad commits which confuse the Microsoft TFS Git implementation (used internally at Microsoft) entered the history of visualfsharp master branch recently, and a force push has been needed. This may affect your working branches if you have cloned or pulled the "visualfsharp" master branch between October 13 and 17.

These commits are “bad” in that they represent repositories with multiple GIt directories distinguished only by capitalization. TFS’s Git support (used internally at Microsoft) can’t consume these commits. We must expunge these commits from the history of the visualfsharp repo. We have no choice since otherwise we can’t integrate back into the Microsoft build systems.

This is relevant if you have pulled visualfsharp master since Oct 13 and have a branch that contains any of the following commits,

commit 2a991b6c8e30c712640e2869972f02c6313cc7e3
commit 169d366713a31c0945328897db5fe58480bf1a43
commit d64ff35398a62c91103e9aa1373c2786bc0e83d6
commit 39480c4c402eb6e37b2ccfa9961189d29b352289
commit 2fe5a3be8227a379a33845c04762f51d3dd24fcf
commit e0318a8f65a596ddf234171c70bc3c535fd5f27f
commit 749ba2dfbbb457e1d746ce7659965d0ce0b34eac
commit 00bab9974f21e71db02e47a000cc6b101bf139a2
commit 2a9b5ef8189500e0af7bf2364d1f89e9b3dd5d1f
commit 8b434e0fedc4f5c51ace6d4c3191d04f01667546
commit 79430d298d916dbfb2628b5c60b9254f3316cc0c
commit b708921ebe0974a31b081f4bae58b4034f9beba9

You can determine if your branch contains these commits by using "git log"

To current pull requests contain these commits, so it doesn't look like this is a big problem. However, If you have a branch that includes the above commits, please rebase or cherry-pick your work to include none of the above commits, and instead be based on the last "good" commit 2002675 .

One way to do this is to do the following in your branch:

git checkout your-branch

# Save your work before you do anything
git branch -f saved-copy-of-your-branch

# Fetch the Microsoft repo and bring yourself up to date against the “bad” master branch
git remote add Microsoft http://github.com/Microsoft/visualfsharp 
git pull Microsoft bad-master
<resolve conflicts>

# Save your work in a stash
git reset --soft 2a991b6c8e30c712640e2869972f02c6313cc7e3
git stash

# Reset back to the last good point in the history
git reset --hard 2002675f8aba5b3576a924a2e1e47b18e4e9a83d 

# Apply the “good” version of the commits
git pull Microsoft master

# Replay your stash.  You can also cherry-pick your commits if you wish to keep your log messages
git stash apply

# Commit your changes once again. 
git commit -a -m “your commit message”

# Do a forced update of your branch back to your Git account since your history has changed
git push -f origin your-branch

If you need advice, please comment below.

Note, if you get the following capitalization conflict in a later merge:

CONFLICT (modify/delete): src/fsharp/fsharp.core.netcore.nuget/layoutfscorenuget.fsx deleted in Updated upstream and modified in Stashed changes. Version Stashed changes of src/fsharp/fsharp.core.netcore.nuget/layoutfscorenuget.fsx left in tree.

Please do the following to clear the merge on this file

git rm --cached src\fsharp\fsharp.core.netcore.nuget\layoutfscorenuget.fsx
git add src\fsharp\FSharp.Core.netcore.nuget\layoutfscorenuget.fsx

Stashed changes

@dsyme dsyme changed the title Force push needed: Bad commits in "master" history Bad commits in "master" history Oct 17, 2016
This was referenced Oct 24, 2016
@dsyme
Copy link
Contributor Author

dsyme commented Oct 24, 2016

Closing this as using squash commits seems to solve problems

@dsyme dsyme closed this as completed Oct 24, 2016
@dsyme dsyme mentioned this issue Oct 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant