git使用

查看本地分支文件信息,确保更新时不产生冲突
[root@master BullSpider]$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
将当前工作目录中更改或者新增的文件加入到的索引中,加入到Git的索引中就表示记入了版本历史中,这也是提交之前所需要执行的一步
[root@master BullSpider]$ git add .
提交当前工作目录的修改内容
[root@master BullSpider]$ git commit -m "注释内容"
上传代码到远程服务器
[root@master BullSpider]$ git push origin master 
查看修改日志
[root@master BullSpider]$ git log 
查看服务端代码分支
[root@master BullSpider]$ git branch 

Git传代码错误fatal:Authentication failed for'https://git……解决方法

原因:主机IP改变了导致认证无效

[root@master BullSpider]$ git push origin master
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'http://172.16.88.120/Big-Data/BullKingSpider.git/'

解决办法:

[root@master BullSpider]$ git config --system --unset credential.helper
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容