github - git checkout a version before a specific commit -
Before I commit specific commitments, I want to check out a version of a branch of git repository. Thinking about syntax.
I know how to check a branch of 'development' (as opposed to master) using the following syntax:
git remote add -t Basically developed - f Basic https://github.com/xy/xy.git
Just wondering how I can check it out but a few weeks ago a specific Was committed.
After you clone the repository, run a git log
and command Find the hash You only need the first 6 characters of committed commitment to checkout, so it will be like a93fh67
. From there, run
git checkout {hash}
is {hash}
that you've found. This will give you a position in the Detected Head
position, where you can review the code. If you want to make changes, then check a new branch using
git checkout -b MyNewBranchName
Comments
Post a Comment