What would be the best workflow to do refactorings intermingled with new features in Git? -
I am using GIT as a source code management tool. << li>
I have more workflow of this workflow The reason for this is that I have faced the situation after some time, which I think is a typical one:
After being committed, I used to add a new working directory I'm starting to revise the feature.
The code for a while, the status of the working directory should be one at this time. The important thing here is that state A is not a working directory ready, because the new feature has not yet been completed.
At this time I realize that it will be better to do a refactoring than before. Accept this, sometimes the need for a refactoring in the process of code modification becomes clear.
Now I have to start again from the head and refactoring first. But I do not want to lose code revision -> State A So basically I need it:
- Refactoring in a copy of the work directory that has not yet changed Last commit
- Earn it
- I have merged the work on which I have started the new facility and when the working directory was in the state
- Work on the full new feature
- reduce it
I believe that the branches can help me, but the correct GIT commands I am confused with the fact that I need to create a branch when the working directory is changed after taking revenge and I do not know how to deal with it properly .
What is the correct way to describe the above workflow as per GIT orders?
You want to hide the git when your working directory is in an intermediate state, which you commit If you are not, run some text to 'git stash' or 'git stash save', it will move your working directory back to the HEAD. Now make a change and commit. Then run 'GIT Landscaping Pop' and your previous intermediate work Will be merged into the working directory. Give them a list of 'GIT status list' ('some text' will identify them.) If you do not give a message, then the last committed log is used.)
'Git add -patch' and git add '--interactive' P>
Comments
Post a Comment