in sourcetree, I stop tracked a file yestoday, but I want to commit it to repository. how can i do it? please help me
What exactly do you mean by "I stop tracked a file"?
Execute a command to stop tracing a file
(Assuming you right-clicked on a file and selected the "Stop tracking" option.)
This command stages a change that deletes the file (line with a red minus in the beginning in the pending changes), but leaves the file intact on your disk (it shows as an untracked file):
image2015-5-22 11:10:26.png
You can undo this by right-clicking on the line with the red minus and selecting "Discard".
EDIT: once this deletion is committed, this is how to undo it:
I commit this red minus file to repository. I can't find "discard" option.
I edited the answer to show the recovery steps for this case as well.
I think in step 3 you want to "Reverse commit".
It looks like you're new here. Sign in or register to get started.