1、缘由:最近在改写springboot的源码,改造为适合公司的架构。
2、步骤:
(1) git init
(2)git add .
(3)git remote add origin git@****:***/**.git
(4)git push --set-upstream origin master
可能会报错:
error: src refspec master does not match any.
error: failed to push some refs to 'git@****:***/**.git'
(5)git commit -m "initial commit"
开始上传文件了
如下内容:
[master (root-commit) 6455a15] initial commit
195 files changed, 16582 insertions(+)
create mode 100755 .cfignore
create mode 100755 .gitattributes
create mode 100755 .mvn/wrapper/maven-wrapper.jar
create mode 100755 .mvn/wrapper/maven-wrapper.properties
create mode 100755 CODE_OF_CONDUCT.adoc
create mode 100755 CONTRIBUTING.adoc
create mode 100755 LICENSE.txt
create mode 100755 README.adoc
create mode 100755 circle.yml
create mode 100755 initializr-actuator/pom.xml
create mode 100755 initializr-actuator/src/main/resources/META-INF/spring.factories
create mode 100755 initializr-actuator/src/test/resources/application-test-custom-stats.yml
......
......
略...
(6)git push origin master
如下内容:
Counting objects: 277, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (248/248), done.
Writing objects: 100% (277/277), 645.84 KiB | 9.94 MiB/s, done.
Total 277 (delta 77), reused 0 (delta 0)
remote: Resolving deltas: 100% (77/77), done.
remote:
remote: ========================================================================
remote:
remote: 遇到问题请看[操作手册](https://goo.gl/7sZ11W)!
remote:
remote: ========================================================================
......
......
略...
3、完成上面几步基本上就可以大功告成了。
可以查看了gitlab