Git通过客户端使用命令上传文件到指定仓库

一  首先需要配置自己的用户名和邮箱。

3.1初始化

git init

3.2将文件添加到缓存区(命令后边有个 “.” )

git add .

3.3关联git仓库

remote add origin http://网址:port/username/git仓库名称.git

3.4添加README

touch README

git add README

3.5第一次提交

git commit -m'first commit'

3.6上传

git push origin master

 

猜你喜欢

转载自blog.csdn.net/tanqingfu1/article/details/108150985