![]() ![]() With the git switch command (or, alternatively, the git checkout command), you can simply provide the name of the branch you want to checkout. Here's how to do this: $ git switch my-branch As said, most of the time you'll want to "checkout" branches, and not individual commits. This makes branches a very safe and convenient tool in Git. The user does not have to do this manually. This also means that, if a new commit is made in that context, the branch pointer is automatically moved to that newest commit. This means that, actually, branches don't point to a certain commit but really always to the latest commit on the corresponding branch. Branches are very practical because they are pointers to the latest commit in a certain context (it helps to think of branches simply as specific, separate contexts with names). ![]() Most of the time, you will want to checkout a branch (and not a specific revision). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |