今天来讲一下如何创建自己的git代码库并上传本地项目
首先先下载git运行终端,下载地址如下,一条龙安装:
在github官方注册git账号
账户名:邮箱 密码随意记住就行
登录账号点击个人信息,再选中Repositories选项,里面是你每个项目的代码库

点击new按钮进入下一个页面

输入代码库名称,选择Create repository按钮创建仓库
我们需要用到的只是https链接

在本地创建F:\new文件夹,里面放入项目文件(在此做例子创建new.txt)
进入文件夹右键选择Git Base Here
依次输入以下命令代码:
// git初始化
git init
// 将本地项目中所有文件暂存到git
git add .
// 写入此次操作的备注信息
git commit -m "写入此次操作的备注信息"
// 把项目与git代码库相连并把项目暂存到git上
git remote add origin https://github.com/sakexiaowei/new.git (代码库https链接)
// 把项目提交到git代码库master分支上
git push -u origin master
注:第一次提交需要输入账户密码

来不及反应的一刷新...

网友评论