Follow a change from history to commit
A customer reports that a discount disappeared after checkout. You know the name of the calculation, but you need to find the change and keep the correction separate from unrelated work.
Find the relevant change
Open the repository tab and follow the branch and tag labels in the commit graph. Show all branches to see where histories meet. Select a commit to inspect its author, parents, subject, body and changed files. Search the log by message, author or abbreviated SHA. Deep search also uses the repository's local search index.
To look up the calculation in the current files, open file search and enter its name. You can match case, whole words or a regular expression, and choose whether to include untracked files. Results are grouped by path. Open a match to read the file in your default editor.
Review a file before staging it
- Select the work in progress row. Open a changed file to compare the two versions side by side. Expand or collapse a block to focus on the relevant lines. Images have before and after previews. A large text diff asks for confirmation before rendering.
- Filter the file list, for example by the path of the checkout code. Stage the correction and its test. If you stage the visible results together, the filter determines which files are included.
- Clear the filter and check the entire staged list. Files staged earlier are still part of the next commit even if the filter hid them. Unstage anything that belongs in another change.
- Write the subject and any supporting detail, then commit. Use Amend only when you intend to replace the previous commit. A push publishes the change to the selected remote branch.
Work on a second branch
To investigate a hotfix while keeping your current edits in place, add a worktree in a different folder for the other branch. Open its tab to work with its own files and index. For a short interruption in the same checkout, save a named stash and restore it when you return. The branch menu also offers merge, fast-forward, rebase, cherry-pick, revert, resets and tags. Check the current branch and the action's target before confirming it.