alex_bn_lee

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

[1095] Git working flow

Ref: How does Git work? Git Tutorial for Beginners

Ref: Git summary: how to use basic git commands


  • Workspace: it’s the place where you see in your computer system, or the directory where you check out your files. Files in the workspace could be added to the Git by using git add command. Basically it could be any folders in your computer.
  • Index: it’s also called stating area. It’s an invisible space where you can add files that you want to commit. To add commit, you can use git commit command.
  • Local repository: it’s also an invisible repository. Actually it’s stored in the .git folder, which is hidden in the folder you created.
  • Remote repository: this could be another computer, or it could be the server of others, such as Github, which we can consider it as a remote repository. To access to the remote repository, git push or git pull could be used.

In addition, we also need to be familiar with some other common concepts in Git.

  • Branch: it’s used to create another line of code. Usually it’s for creating another new feature. Once the new feature has completed, it can be merged back the the master branch.
  • Master Branch: we can consider it as the main branch/code to work on. You can add other branches if needed. But the whole project can only have one master branch.
  • Commit: it holds the current state of the repository. It can be considered as a node of a linked-list. Every commit has a pointer to the parent commit object. You can go back to the parent commit object by changing the pointer.
  • HEAD: it is the pointer to the most recent commit on the current branch. It’s actually a hash value of current commit, which is calculated by SHA-1 hash on a file with a hash value of 160 bits that uniquely identifies the contents of the file.

posted on   McDelfino  阅读(2)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2023-01-16 【801】Python绘制机器学习特征相关性热力图
点击右上角即可分享
微信分享提示