git的区域是什么意思?GIT区域介绍
互联网开发 918
git有3个区域
工作区(working directory):
项目的根目录,不包括.git在内的其他文件,就是你平时存放项目代码的地方。
暂存区(stage area):
是一个看不见的区域,git add
命令就是将文件添加到该区域,git status
命令可以查看当前暂存区的文件
暂存区,用于临时存放你的改动,事实上它只是一个文件,保存即将提交到文件列表信息,一般存放在 gt 目录下.index 文件 (git/index) 中,所以我们把暂存区有时也叫作索引 index)
本地仓库(repository):
指在工作目录下创建的一个.git目录,这是一个隐藏目录。git commit -m "日志"
名可以将
暂存区的代码提交到本地仓库。git push -u origin master
就是将本地仓库的代码推送到远程仓库
仓库区(或本地仓库),就是安全存放数据的位置,这里面有你提交到所有版本的数据。

git文件的3种状态
- 已修改(modified),存在于工作区,文件修改后的状态
- 已暂存(staged),存在于暂存区,采用
git add
命令后的状态 - 已提交(committed),存在于本地仓库,采用
git commit
命令后的状态
请在浏览器中启用JavaScript来完成此表单。
( function() {
const style = document.createElement( 'style' );
style.appendChild( document.createTextNode( '#wpforms-17950-field_1-container { position: absolute !important; overflow: hidden !important; display: inline !important; height: 1px !important; width: 1px !important; z-index: -1000 !important; padding: 0 !important; } #wpforms-17950-field_1-container input { visibility: hidden; } #wpforms-conversational-form-page #wpforms-17950-field_1-container label { counter-increment: none; }' ) );
document.head.appendChild( style );
document.currentScript?.remove();
} )();

请输入姓名或昵称
如果您有任何疑问、需要更多信息或希望与我们建立合作请留言
=