-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Revert policy #3166
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
Comments
I agree, |
@Kubuxu can this issue be moved to ipfs/notes, or ipfs/support or somewhere else? |
I think it is quite meta to go-ipfs. I don't know if others want to apply it to their projects. |
Yes, I think we should do this community wide. Thanks for write up @Kubuxu
|
This comes directly from ipfs/kubo#3166, and @Kubuxu. I have added it here and edited it slightly for language.
This comes directly from ipfs/kubo#3166, and @Kubuxu. I have added it here and edited it slightly for language.
(closing due to age) |
When some change is introduced and we decide that it isn't beneficial and/or it causes problems we need to revert it.
To make later review process easier and the changes easier I propose that we always you git's
revert
command to revert some changes.This suits few purposes. First, it is much easier to see if some change was reverted by just looking into history of the file. Imagine commit with title: Add feature C, there are many ways one could form the title for commit reverting it but by using
git revert
it will be Revert: "Add feature C" and thus very clear.Second is that using
git revert
we are sure that all changes were reverted, it is much easier to star again for state 0 and apply changes on it, than try to see if some transformation transforms state 1 to state 0.Q&A
What if commit that is supposed to be reverted contains changes that are also good?
This usually means that commit wasn't granular enough, if you are person that initially created the commit, in future try to make commits that focus on just a one aspect.
This doesn't mean that you should skip using
git revert
. Use it, then usegit cherry-pick --no-commit
to pull changes into your working tree and use interactive add to commit just the wanted ones. If interactive add is not enough to split the changes, still use interactive add to stage super set of wanted changes and usegit checkout -- <file>
to remove unstaged changes. Then proceed to edit files to remove all unwanted changes, add wanted changed and commit them only.This way your log will look like:
Sounds good to you? This is just a proposal of what we should do. We can totally rework the idea.
If you have more questions, just post them, I will try to answer them.
The text was updated successfully, but these errors were encountered: