-
Notifications
You must be signed in to change notification settings - Fork 0
Git
This would not be a single cherry-picked commit, but rather cherry-picking between branch states. It's an unpleasant scenario, but it does happen in chaotic environments and projects.
The easiest way to walk back is to merge the branch, undo the commit (if using a GUI or other tools that auto-committed on a clean merge), and manually revert files you don't want included. Stage any untracked adds. Then use a simple git status
to determine which files actually changed.
For some reason I struggled to figure this out. Is this one reason people sometimes choose to rebase?
git log --since="2021-09-27" --name-only --pretty=format: | sort | uniq
- Navigate to your project’s commits log. I usually click the "# commits" link at the top of the repository with the latest commit info. This opens the full log of commits for the repository.
- Copy the from and to commit IDs/SHAs. You can use the copy icon to do so.
- Append "compare" to the end of your repository URL (
https://github.com/[repo path]/compare/
) – I couldn't find a way to access this via the interface? - Paste the from and to commit IDs/SHAs to the end of the URL, with
...
between them:https://github.com/[repo path]/[from]...[to]
- Click the "Files changed" tab
- Click the "# changed files" link near the top of the diff to see just a list of impacted files
More information: https://docs.github.com/en/free-pro-team@latest/github/committing-changes-to-your-project/comparing-commits
git diff --name-only
This seems to skip "untracked" files (new files).
Testing what this does?