deepinuser17
deepin
2020-09-04 15:45 用命令“git status”可以查看所有被修改,增加的文件,以及所有被改动文件的状态。
Copy the Code
- 修改的文件尚未被加入:
- $ git status
- On branch master
- Your branch is up to date with 'origin/master'.
- Changes not staged for commit:
- (use "git add ..." to update what will be committed)
- (use "git checkout -- ..." to discard changes in working directory)
- modified: README
- modified: README.md
- Untracked files:
- (use "git add ..." to include in what will be committed)
- contrib/centos/
- newfile1
- newfile2
- no changes added to commit (use "git add" and/or "git commit -a")
- 所有被修改文件已经记入:
- $ git status
- On branch master
- Your branch is up to date with 'origin/master'.
- Changes to be committed:
- (use "git reset HEAD ..." to unstage)
- modified: README
- modified: README.md
- new file: contrib/centos/openssh.spec.centos
- new file: newfile1
- new file: newfile2
- Git commit:
- $ git commit -m "test commits"
- [master 63df26c8] test commits
- Committer: Local User
- Your name and email address were configured automatically based
- on your username and hostname. Please check that they are accurate.
- You can suppress this message by setting them explicitly. Run the
- following command and follow the instructions in your editor to edit
- your configuration file:
- git config --global --edit
- After doing this, you may fix the identity used for this commit with:
- git commit --amend --reset-author
- 5 files changed, 856 insertions(+)
- create mode 100644 contrib/centos/openssh.spec.centos
- create mode 100644 newfile1
- create mode 100644 newfile2
- git commit以后,本地修改仍然需要推送到主机分支:
- $ git status
- On branch master
- Your branch is ahead of 'origin/master' by 1 commit.
- (use "git push" to publish your local commits)
- nothing to commit, working tree clean
Reply Like 0 View the author


中文 