UBUNTU 如何上传文件代码到github 参考链接
1.进入GitHub官网,选择repositories
2.创建一个空仓库
3.获取新建好的仓库地址,并按照下方操作:这里起 yourname
git clone https://github.com/xxno-n/yourname.git
cd yourname
echo "# yourname" >> README.md
git init
git add README.md
4.将你要上传的文件或文件夹赋值到该文件夹里,并作如下操作:
第一次操作会提示要输入邮箱和名字:
git config --global user.email "1606598696@qq.com"
it config --global user.name "xxno-n"
复制文件或文件夹到该目录下:
cp 文件名称/或文件夹名称 ./
逐一对该目录下的文件进行:
git add 文件名称/或文件夹名称
5.上传文件至GitHub
git commit -m "first commit"
git remote add origin https://github.com/xxno-n/yourname.git
git push -u origin master
按照提示输入名字和密码:
Username for 'https://github.com': xxno-n
Password for 'https://xxno-n@github.com':
完结…
刷新GitHub页面即会出现刚刚上传的文件: