Stage and revert selected ranges If you only want to commit some of the changes in a file, use stage selected ranges to create a commit with just the selected changes. Use revert selected ranges to undo a subset of the changes in the file.