How to automatically create files in SourceTree

Every time I want to commit changes that I have made, I have to check the "Unprocessed files" checkbox, even if I have previously committed them, and only changed their contents.

I cannot find settings for this anywhere. Is it there? If not, is there a reason? And / or is there a workaround?

thank

+3


source to share


2 answers


What you're running into is called two-stage commit . This is really extremely useful:

https://softwareengineering.stackexchange.com/questions/69178/what-is-the-benefit-of-gits-two-stage-commit-process-staging

  • Divide work into separate commits.

You've probably opened the file many times to write a one-line fix, but at the same time, you noticed that the formatting was wrong, some documents could be improved, or some other unrelated fixes. With other RCSs, you have to write that down or pipe it into memory, complete the fix you came for, commit that, and then come back to fix other stuff (or create a mud ball commit with unrelated things). With Git, you just fix it all at once, and stage + commit one line separately, with Git add -i or git -gui.

  1. Don't break the assembly.

You are working on a complex modification. So you are trying to do different things, some of which work better than others, some of which break things. With Git, you put things in when a change made things better, and check (or tweak a little more) when a modification doesn't work. You don't have to rely on the undo editor, you can check out the entire repo instead of just files by file and any file-level errors (like deleting a file that hasn't been committed, or saving + closing after a bad modification) doesn't result in a lot of lost work ...



See also:

+1


source


The answer to your question is "No. You cannot do this."



This is because designers believe that two-step commit will be useful. While this is true, there is still no reason why they didn't have a two-step commit where it all starts until you stop it. Seen from the outside, it looks like a case where the designers think they understand what suits the user better than the user does.

+1


source







All Articles