gitee创建仓库方法

  • Post author:
  • Post category:其他

一、在本地磁盘创建好文件夹和随意一个文件(文件夹作仓库,文件是测试用)

 

二、在gitee创建仓库,点击加号->新建仓库,后在新建仓库界面操作

 然后就进入创建仓库界面,仓库名称尽量和你创建的文件夹名字相同就行(如果不同会出错?好像是会?传输错误),也方便维护。

三、在之前创建的文件夹路径上输入cmd再回车,出现命令行界面,在这页面中操作

新建仓库之会弹出简单的命令教程界面:

 

 四:命令行操作

D:\workspace\gitee>git config --global user.name "bgzsz"

D:\workspace\gitee>git config --global user.email "329857630@qq.com"

D:\workspace\gitee>git init
Initialized empty Git repository in D:/workspace/gitee/.git/

D:\workspace\gitee>mkdir cgb2107

D:\workspace\gitee>git add . 

D:\workspace\gitee>git commit -m "first commit"
[master (root-commit) a988df5] first commit
 1 file changed, 1 insertion(+)
 create mode 100644 1.txt

D:\workspace\gitee>git remote add origin https://gitee.com/liu-binbin/cgb2107.git

D:\workspace\gitee>git push -u origin master
remote: bgzsz: Incorrect username or password (access token)
fatal: Authentication failed for 'https://gitee.com/liu-binbin/cgb2107.git/'

D:\workspace\gitee>git push -u origin master
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 208 bytes | 208.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote: Powered by GITEE.COM [GNK-6.1]
To https://gitee.com/liu-binbin/cgb2107.git
 * [new branch]      master -> master
Branch 'master' set up to track remote branch 'master' from 'origin'.

D:\workspace\gitee>

如中间有操作报错的话,面向百度。。。。

最后创建成功!


版权声明:本文为bgzsz原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。