Git本地仓库常用命令

2018-09-17  本文已影响0人  一块没梦想的海绵宝宝

本地仓库常用命令

C:\Users\98100>git config --global user.name "AithusaDou"
C:\Users\98100>git config --global user.email "981006610@qq.com"
C:\Users\98100>d:
D:\>mkdir learngit
D:\>cd learngit
D:\learngit>git init
Initialized empty Git repository in D:/learngit/.git/
D:\learngit>git add hello.txt
D:\learngit>git status
On branch master

Initial commit

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

        new file:   hello.txt

D:\learngit>git commit -m "create hello.txt file"
[master (root-commit) d096a64] create hello.txt file
 1 file changed, 1 insertion(+)
 create mode 100644 hello.txt
D:\learngit>git log
commit 6757e227e580a6e6becf59b7c1a8b021e0195a71 (HEAD -> master)
Author: AithusaDou <981006610@qq.com>
Date:   Mon Sep 17 08:56:31 2018 +0800

    add a new line

commit d096a6428f66725637688b4d9b81f45be5ea2a64
Author: AithusaDou <981006610@qq.com>
Date:   Mon Sep 17 08:54:37 2018 +0800

    create hello.txt file
D:\learngit>git reset --hard d096a
HEAD is now at d096a64 create hello.txt file
上一篇 下一篇

猜你喜欢

热点阅读