Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I get local files to reflect a specific commit point?

Bledig
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 22, 2020

I just set up a repo to use with Unity, Sourcetree as the git client. Something I'm not clear on is testing Unity at different commit points. So for example, a separate branch is created for a sprint, someone else makes changes, does a commit, and it needs to be tested on my end. I'm expecting in Sourcetree that I can select that point, perhaps in history, and then the files locally will change to reflect that snapshot. So then I could just launch Unity for that project and it can only access the files that were available at that particular commit. Am I understanding the concept correctly? And how do I do that?

The concept is using only one installation of Unity, one repo, but able to test at any point, in any branch, along the development process. Thanks.

2 answers

1 accepted

0 votes
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 22, 2020

Hi @Bledig,

Welcome to Atlassian Community!

To checkout a specific commit, locate it in the History view, right-click and either create a branch or checkout the commit. If you need to come back to the commit multiple times I would recommend that you create a branch. 

Bledig
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 22, 2020

I like it! It works well, thank you.  :)

Jeff Tillwick May 4, 2024

Yeah, just scroll through potentially thousands for commits manually and find the matching commit id you have already copy and pasted. SO EFFICIENT. Why would you ever need a UI element to checkout by commit id? That would be too simple. The hunt is more important. /s 

How about a solution for those of us that live in the real world?

0 votes
Jeff Tillwick May 4, 2024

The best way I have found is to create a new branch from that commit. Press the branch button in the top button bar and give your branch a name and select `Specified Commit:` and put in the id.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events