标签:凭证 push csdn text dash 存储 显示 art branch
引用:https://blog.csdn.net/huanhuaqian/article/details/81986064 (huanhuaqian)
https://www.liaoxuefeng.com/wiki/896043488029600/898732864121440 (廖雪峰的官方网站)
https://blog.csdn.net/Hanani_Jia/article/details/77950594 ( Hanani_Jia)
$ ssh-keygen-t rsa-C "your_email@youremail.com"
$ ssh -T git@github.com
(You‘ve successfully authenticated, but GitHub does not provide shell access)
已连接但需要设置
$ git config --global user.name "xxxxxx"
$ git config --global user.email "xxxxx"
$ git clone https://github.com/xxxxx (github仓库的地址)
ls 查询包含文件$ git add xxx.txt
$ git commit -m "备注"
$ git push origin master
(弹出github登录框,登陆失败可能是大小写或者读取本地错误凭证)
更改凭证方法:https://my.oschina.net/Jackcrj/blog/2991933
git rm test.txt (删除文件)
git rm -r test (删除文件夹)
1、git branch
——*master 只显示master
2、然后查看是否从上游拉了
git remote –v
若什么都没有,则和上游已断联系,拉不了代码也推不了代码
3、加关联
git remote add origin ssh://git@gitlab*********************************.git(地址)
4、git fetch origin
会显示下拉的branch情况
格式为From ssh://gitlab.********************************
* [new branch] XXXXX ->origin/XXXXX
5.再次检查远程仓库,显示对应的clone地址
git remote –v
——origin git://github.com/schacon/ticgit.git (fetch)
origin git://github.com/schacon/ticgit.git (push)
6.然后再查分支
git branch –a
mater
remotes/origin/XXXXXX **********
具体的切换分支可参考https://blog.csdn.net/tanningzhong/article/details/79724488
标签:凭证 push csdn text dash 存储 显示 art branch
原文地址:https://www.cnblogs.com/shichenzi/p/11826760.html