git中staged 和 unstaged的区别

总结:

Untracked:不在Git里.
Unstaged:在Git里但没有commit.
Staged:在Git里且已commit
在这里插入图片描述

Furthermore, what are staged changes?
A staging step in git allows you to continue making changes to the working directory, and when you decide you wanna interact with version control, it allows you to record changes in small commits. Suppose you have edited three files ( a. After that you need to commit all the changes so that the changes to a.

此外,什么是staged ?
git中的staging 允许您继续对working directory 进行更改,当您决定要与版本控制交互时,它允许您在小提交中记录更改。假设您已经编辑了三个文件(a.在此之后,您需要提交所有更改,以便将更改提交到a.;

Additionally, what is staged and unstaged files in Sourcetree? The unstaged files are just the files with the last modifications you brought. The staged file are like a snapshot that you take at a T time, Git will store these snapshots under staged files (one snapshot/file at a time).
unstaged文件就是你最后修改过的文件。staged文件类似于您在T时刻拍摄的快照,Git将这些快照存储在staged 文件中(每次一个快照/文件)。

how do you get staged changes?

If you want to see what you’ve staged that will go into your next commit, you can use git diff --staged. This command compares your staged changes to your last commit. The command compares what is in your working directory with what is in your staging area.

What does unstaged mean?

Adjective. unstaged (not comparable) (theater) Not formally staged; not presented to an audience on a stage. Occurring without any preplanning or preparation; genuine.

The “changes not staged for commit” message shows when you run the “git status” command and have a file that has been changed but has not yet been added to the staging area.

  • 4
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值