How can I bring a specific commit and work on it : on git -
i new user of git. have many files.
how can bring specific file , work on it,without deleting other commit? tried use reset --hard , checkout deletes other commit. correct way?
from reading title , comments afterward, interpreted question mean want go old commit , work off of it, still have new changes intact future purposes.
first, commit of files working on don't lose anything. then, perform
git log
and find commit hash commit want go to. copy commit clipboard, , type
git branch <insert_new_branch_name_here> <insert_commit_hash_here>
then,
git checkout <insert_new_branch_name_here>
this should bring new branch latest revision commit want work from.
your previous changes on top of commit still available in branch on.
Comments
Post a Comment