赞
踩
网址: https://gitee.com/
Setup --基本版
Portable–便携版
区别:Portable 可以安装在U盘等便携设备上,不会在注册表上留下记录 因此也不会 在右键显示 git Bash here”和“git GUI here”
(1)网址悬浮右键–>复制链接地址
(2)打开迅雷 点击新建 一般会自动填充 不自动就自己复制网址到框里 确认下载即可
1.双击git安装程序–> 点击next -->选择安装的路径位置 --> 一路next就可以 最后选择Install 安装 如图安装完毕 点击Finish
2.右键发现新增 git Bash here”和“git GUI here”,安装完.
$ git config --global user.name "xxx"
$ git config --global user.email "xxx"
txl@DESKTOP-DT4R7UO MINGW64 /d/JavaProjects/demo
$ git init
Initialized empty Git repository in D:/JavaProjects/demo/.git/
txl@DESKTOP-DT4R7UO MINGW64 /d/JavaProjects/demo
$ git config --global --add safe.directory D:/JavaProjects/demo
txl@DESKTOP-DT4R7UO MINGW64 /d/JavaProjects/demo (master)
$ git add .
warning: in the working copy of '.gitignore', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'pom.xml', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/main/java/com/example/demo/DemoApplication.java', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'src/test/java/com/example/demo/DemoApplicationTests.java', LF will be replaced by CRLF the next time Git touches it
txl@DESKTOP-DT4R7UO MINGW64 /d/JavaProjects/demo (master)
$ git commit -m '本次提交的说明123456'
[master (root-commit) 4c2e63f] 本次提交的说明123456
15 files changed, 889 insertions(+)
create mode 100644 .gitignore
create mode 100644 .mvn/wrapper/MavenWrapperDownloader.java
create mode 100644 pom.xml
create mode 100644 src/main/java/com/example/demo/controller/TestController.java
txl@DESKTOP-DT4R7UO MINGW64 /d/JavaProjects/demo (master)
$ git remote add origin https://gitee.com/******/test-demo.git
$ git push -u origin "master"
Enumerating objects: 32, done.
Counting objects: 100% (32/32), done.
Delta compression using up to 12 threads
Compressing objects: 100% (23/23), done.
Writing objects: 100% (32/32), 54.46 KiB | 13.62 MiB/s, done.
Total 32 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Powered by GITEE.COM [GNK-6.4]
To https://gitee.com/***********/test-demo.git
* [new branch] master -> master
branch 'master' set up to track 'origin/master'.
发现代码已经推送至远程仓库了,至此本地的代码已经推送到远程仓库了,执行命令遇见错误时 按照git给的提示就可以。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。