本地上传代码到gitlab流程

1.官网下载git,安装本地

2.需要上传的文件夹右键,git bash here

 

 

 

 

b、cd ~/.ssh/

如果提示 “ No such file or directory”,你可以手动的创建一个 .ssh文件夹即可

        mkdir ~/.ssh

 生成key

ssh-keygen -t rsa -C "2323242424@qq.com"

 最后生成两个文件:id_rsa和id_rsa.pub

 

 

    把id_rsa.pub里的内容粘贴到gitlab密钥中

c、配置全局的name和email,参照你创建的工程Git global setup

git config --global user.name "test"
git config --global user.email "2323242424@qq.com"
git init
git remote add origin http://xxxxxxxxxxxxxxxxxxxx.git
git add .
git commit -m "teststewwrw"
git push -u origin master

 

posted @ 2020-09-09 09:53  散落人间  阅读(673)  评论(0编辑  收藏  举报
interface food{} class A implements food{} class B implements food{} class C implements food{} public class StaticFactory { private StaticFactory(){} public static food getA(){ return new A(); } public static food getB(){ return new B(); } public static food getC(){ return new C(); } } class Client{ //客户端代码只需要将相应的参数传入即可得到对象 //用户不需要了解工厂类内部的逻辑。 public void get(String name){ food x = null ; if ( name.equals("A")) { x = StaticFactory.getA(); }else if ( name.equals("B")){ x = StaticFactory.getB(); }else { x = StaticFactory.getC(); } } }