Git上传使用方法
先在你需要上传的目录右键选择Git Bash Here,然后执行以下代码
git init //同一个文件夹里只执行一次
git add . //如果想添加特定文件,把.换成对应的文件名就行了
git commit -m "first commit" //添加提交信息
git remote add origin http://github.com/用户名/仓库.git //git clone http://github.com/用户名/仓库.git (克隆现有的仓库)
git push -u origin master //第二次以后用git push origin master,如果需要覆盖方式可以用git push -f origin master
如果第一次操作,会出现需要输入邮箱和用户名的情况,执行以下的代码就好了
git config --global user.email "你的邮箱"
git config --global user.name "你的用户名"
git commit -m "first commit"
添加版本号上传
git init
git add .
git commit -m "first commit"
git remote add origin http://github.com/用户名/仓库.git
git push origin master
git tag -a 1.0 -m "1.0"
git push origin 1.0
提示问题
error: src refspec master does not match any
error: failed to push some refs to "http://github.com/..."
//没有git commit
On branch master
Your branch is up to date with 'origin/master'.
//版本分支的问题
其他命令
git branch newbranch //新建一个分支
git branch //检查分支
git checkout newbranch //切换到你的新分支
git status //检查是否成功
git merge newbranch //将新分支提交的改动合并到主分支上
git branch -D newbranch //删除这个分支
jsdelivr使用方法
//cdn.jsdelivr.net/gh/用户名/仓库名@版本号(非必须)/目录/文件
Git
下载地址
声明:声明:本文全部内容均从网络中采集而成,只做测试与学习之用,请在下载后24小时自行删除,如有任何涉及版权的问题,请及时联系站长删除内容。谢谢!(邮箱:doubaiwang@126.com)