wyyy721 发表于 2018-9-16 11:07:27

代码版本控制Git工具使用详解

# git add test.txt  # git commit -m "add new file test.txt"
   add new file test.txt
  1 file changed, 3 insertions(+)
  # git status
  # On branch master
  # Untracked files:
  #   (use "git add ..." to include in what will be committed)
  #
  #   .test.txt.swp
  nothing added to commit but untracked files present (use "git add" to track)
  # git log
  commit 26547288f6ad9e70ab842b4848febc6d4ddeb5aa
  Author: server-1
  Date:   Sun Apr 8 11:44:27 2018 +0800
  add new file test.txt
  commit 66455b2eaeb1bde8f76b54626d290ac814642723
  Author: server-1
  Date:   Sun Apr 8 10:09:53 2018 +0800
  add new file test.txt
  # git log
  commit 26547288f6ad9e70ab842b4848febc6d4ddeb5aa
  Author: server-1
  Date:   Sun Apr 8 11:44:27 2018 +0800
  add new file test.txt
  commit 66455b2eaeb1bde8f76b54626d290ac814642723
  Author: server-1
  Date:   Sun Apr 8 10:09:53 2018 +0800
  add new file test.txt
  # ^C
  # git log
  commit 26547288f6ad9e70ab842b4848febc6d4ddeb5aa
  Author: server-1
  Date:   Sun Apr 8 11:44:27 2018 +0800
  add new file test.txt
  commit 66455b2eaeb1bde8f76b54626d290ac814642723
  Author: server-1
  Date:   Sun Apr 8 10:09:53 2018 +0800
  add new file test.txt

页: [1]
查看完整版本: 代码版本控制Git工具使用详解