安装git克隆项目代码修改后怎么显示文件状态
Tofloor
poster avatar
flynn365
deepin
2020-09-04 07:05
Author
win下面可以自动显示绿色红色等不同状态的图标,linux下怎么设置,或者什么软件能做到?只看文件夹没办法知道提交没,很不方便
Reply Favorite View the author
All Replies
avatar
deepinuser17
deepin
2020-09-04 15:45
#1
用命令“git status”可以查看所有被修改,增加的文件,以及所有被改动文件的状态。

  1. 修改的文件尚未被加入:

  2. $ git status
  3. On branch master
  4. Your branch is up to date with 'origin/master'.

  5. Changes not staged for commit:
  6.   (use "git add ..." to update what will be committed)
  7.   (use "git checkout -- ..." to discard changes in working directory)

  8.         modified:   README
  9.         modified:   README.md

  10. Untracked files:
  11.   (use "git add ..." to include in what will be committed)

  12.         contrib/centos/
  13.         newfile1
  14.         newfile2

  15. no changes added to commit (use "git add" and/or "git commit -a")

  16. 所有被修改文件已经记入:

  17. $ git status
  18. On branch master
  19. Your branch is up to date with 'origin/master'.

  20. Changes to be committed:
  21.   (use "git reset HEAD ..." to unstage)

  22.         modified:   README
  23.         modified:   README.md
  24.         new file:   contrib/centos/openssh.spec.centos
  25.         new file:   newfile1
  26.         new file:   newfile2


  27. Git commit:

  28. $ git commit -m "test commits"
  29. [master 63df26c8] test commits
  30. Committer: Local User
  31. Your name and email address were configured automatically based
  32. on your username and hostname. Please check that they are accurate.
  33. You can suppress this message by setting them explicitly. Run the
  34. following command and follow the instructions in your editor to edit
  35. your configuration file:

  36.     git config --global --edit

  37. After doing this, you may fix the identity used for this commit with:

  38.     git commit --amend --reset-author

  39. 5 files changed, 856 insertions(+)
  40. create mode 100644 contrib/centos/openssh.spec.centos
  41. create mode 100644 newfile1
  42. create mode 100644 newfile2

  43. git commit以后,本地修改仍然需要推送到主机分支:

  44. $ git status
  45. On branch master
  46. Your branch is ahead of 'origin/master' by 1 commit.
  47.   (use "git push" to publish your local commits)

  48. nothing to commit, working tree clean
Copy the Code
Reply View the author
avatar
SamLukeYes
deepin
2020-09-04 15:58
#2
vscode 可以,dolphin 也行
Reply View the author
avatar
flynn365
deepin
2020-09-04 22:32
#3
https://bbs.deepin.org/post/201316
用命令“git status”可以查看所有被修改,增加的文件,以及所有被改动文件的状态。

...

如果能直接在文件夹看到状态就更好了,像TortoiseGit那样
Reply View the author
avatar
deepinuser17
deepin
2020-09-05 18:34
#4
QGit是Linux上的一个图形用户端.QGit可以从应用商店下载.其它还有gitg, GitEye, Git Annex.
Reply View the author