sourcegit-scm / sourcegit

Windows/macOS/Linux GUI client for GIT users
MIT License
616 stars 66 forks source link

[FEATURE] Allow to checkout to any commit in the tree. #144

Closed filipeRmlh closed 1 month ago

filipeRmlh commented 1 month ago

Sometimes is needed to test parts of the applications that is not necessary up to date with any branch or tag. I didn't notice any way to do that with the current state of the application.

love-linger commented 1 month ago

You can select any commit in the histories page, and then click right mouse to open the context menu of that commit. For example:

image

You can create new branch base on the selected commit or reset your current branch to that revison.

filipeRmlh commented 1 month ago

Yes, I could do that. But that wasn't what I meant. I'm talking about checking out the commit itself. Sometimes it happens to be necessary.

love-linger commented 1 month ago

I do NOT understand. Did you talk about cherry-pick or archive command?

image

Or you can provide the Git commands to do that job.

gadfly3173 commented 1 month ago

I do NOT understand. Did you talk about cherry-pick or archive command?

I think filipeRmlh means git checkout <SHA1>, which would not create a new branch.

git checkout \<SHA1>: Switches to a specific commit, creating a detached HEAD state. git reset: Moves the current branch's HEAD to a different commit, with options to affect the index and working directory. git checkout -b \<branch name> \<SHA1>: Creates a new branch starting from a specific commit, allowing you to safely work from that point in history.

filipeRmlh commented 1 month ago

I just made a Pull request about it... but I think it needs review. rs

love-linger commented 1 month ago

I've merged PR #147.