abc@admins-PC MINGW64 /f/workspace01/study-dangdang-bookmarket-git01
$ git init
Initialized empty Git repository in F:/workspace01/study-dangdang-bookmarket-git01/.git/
abc@admins-PC MINGW64 /f/workspace01/study-dangdang-bookmarket-git01 (master)
$ git config user.name devjack18 【创建用户,与远程仓库可以是同一用户,也可以不是同一用户】
abc@admins-PC MINGW64 /f/workspace01/study-dangdang-bookmarket-git01 (master)
$ git config user.email dev_jack18@163.com
abc@admins-PC MINGW64 /f/workspace01/study-dangdang-bookmarket-git01 (master)
$ ll
total 0
drwxr-xr-x 1 wqq 197121 0 四月 21 23:09 build/
drwxr-xr-x 1 wqq 197121 0 四月 21 23:09 src/
drwxr-xr-x 1 wqq 197121 0 四月 21 23:09 WebContent/
abc@admins-PC MINGW64 /f/workspace01/study-dangdang-bookmarket-git01 (master)
$ git add .
warning: LF will be replaced by CRLF in src/com/example/demo/SpringbootDemoApplication.java.
The file will have its original line endings in your working directory
abc@admins-PC MINGW64 /f/workspace01/study-dangdang-bookmarket-git01 (master)
$ git add .
abc@admins-PC MINGW64 /f/workspace01/study-dangdang-bookmarket-git01 (master)
$ git commit -m '第一提交代码'
[master (root-commit) f5d62ee] 第一提交代码
6 files changed, 129 insertions(+)
create mode 100644 WebContent/META-INF/MANIFEST.MF
create mode 100644 src/cn/miss/core/web/login.java
create mode 100644 src/com/example/demo/SpringbootDemoApplication.java
create mode 100644 src/com/example/demo/controller/TestController.java
create mode 100644 src/com/example/demo/entity/Customer.java
create mode 100644 src/com/example/demo/mapper/CustomerMapper.java
abc@admins-PC MINGW64 /f/workspace01/study-dangdang-bookmarket-git01 (master)
$ git remote add origin https://github.com/devrose18/study-dangdang-bookmarket-git01.git
abc@admins-PC MINGW64 /f/workspace01/study-dangdang-bookmarket-git01 (master)
$ git push origin master 【然后,输入远程仓库origin的用户名和密码】
fatal: HttpRequestException encountered.
An error occurred while sending the request.
Username for 'https://github.com': devrose18
Enumerating objects: 21, done.
Counting objects: 100% (21/21), done.
Delta compression using up to 4 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (21/21), 2.04 KiB | 161.00 KiB/s, done.
Total 21 (delta 0), reused 0 (delta 0)
To https://github.com/devrose18/study-dangdang-bookmarket-git01.git
* [new branch] master -> master
Eclipse新建项目,git命令第一次提交项目
最新推荐文章于 2022-11-30 16:47:09 发布