Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I label my current git branch as ok then continue

I am in the middle of work on a branch.

I've reached a "works so far" point.

I want to clearly label my current state with a label, e.g. "ok_so_far".

So that when I continue and if (... ok when) I mess up I can get back to this point easily.

I know I can refer to the SHA but I was wondering how can I put a label at the current point (kinda like a release label I guess) so that it's really clear what point to go back to and hopefully be referencing a human readable label as opposed to a SHA.

like image 971
Michael Durrant Avatar asked Dec 15 '22 21:12

Michael Durrant


2 Answers

You're looking for a tag:

git tag ok_so_far

You can then use the name ok_so_far in place of the SHA1 commit identifier.

like image 126
Greg Hewgill Avatar answered Jan 13 '23 12:01

Greg Hewgill


Another possible solution is a note.

like image 34
kostix Avatar answered Jan 13 '23 14:01

kostix