git 提交

2019-07-20  本文已影响0人  路尔轩
Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test
$ git init
Initialized empty Git repository in C:/Users/Administrator/Desktop/test/.git/

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ git add README.md
fatal: pathspec 'README.md' did not match any files

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ echo "# test" >> README.md

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ git commit -m "first commit"
On branch master

Initial commit

Untracked files:
        README.md

nothing added to commit but untracked files present

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ git add .
warning: LF will be replaced by CRLF in README.md.
The file will have its original line endings in your working directory

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ git commit -m "first commit"
[master (root-commit) e13205d] first commit
 2 files changed, 2 insertions(+)
 create mode 100644 README.md
 create mode 100644 aa.txt

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ git remote add origin https://github.com/luerxuan/test.git

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$ git push -u origin master
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 269 bytes | 269.00 KiB/s, done.
Total 4 (delta 0), reused 0 (delta 0)
To https://github.com/luerxuan/test.git
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.

Administrator@Q4DGPPXCSFPJREV MINGW64 ~/Desktop/test (master)
$

上一篇 下一篇

猜你喜欢

热点阅读