![]() Git now knows that the master points to the specific commit and everything works smoothly now. git/refs/heads/master Note that I printed full ID into refs/heads/master as I was inside the. #7cb50860d4f0edae6b584aee195e243e2cf6145a (HEAD -> master) Second commitĪll we had to do was to write the ID of the latest commit into the file. All we have to do is to create a file named master inside the. If the master doesn’t have any commits yet, but the commits exist, then maybe we will connect them to the master branch? It’s very simple. They are all simple files, and we will examine them all □ Branches It should also put some light on the topics I’d like to describe in this post – branches, tags and remotes. ![]() I hope it’s clear and let you understand how elegant this whole system is. It shows the structure of the files inside the. ![]() THE ULTIMATE DIAGRAM OF ALMOST EVERYTHING IN GIT The Ultimate Git Diagram □ But we would like them to be accessible in a more friendly way. git/objects folder and can be accessed by name. How come, if we committed our work, where the commits are? We have two commits, the first is the parent of the second, but we cannot just use git log to see the history, as master doesn’t have any commits yet. #fatal: your current branch 'master' does not have any commits yet Git commit-tree 9aa6b0a47fe2d85baffaedd4f33b4db8aa89ad4d -m 'Second commit' So we take their IDs and write as commits. #We have two trees that we would like to commit. (the tree we had are still there) and try to make them full-fledged items. But what does it mean – attached? Let’s create commits again Last time we lost our two newly created commits, as they were „loose objects”, not attached to anything. Because branches, tags, refs, in general, are just files. That might be a bit overwhelming, so today we will work mostly with plain text files. ![]() In two previous parts, we dealt with Git objects that were of compressed files form. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |