首页 > 其他 > 详细

Git 问题小结

时间:2018-07-24 21:36:07      阅读:128      评论:0      收藏:0      [点我收藏+]

Git Status 中文乱码解决

  现象:  

       技术分享图片

  解决办法:打开Git Bash,执行git config --global core.quotepath false

linux init git project

  • GitHub上创建一个repositories项目,比如 :https://github.com/NightAlexLy/doc.git
  • 在自已的项目下面执行。 git init
  • 将资源文件添加到git。git add .
  • 提交 git commit -m "log message(自己的提交日志)”
  • git remote add origin https://github.com/NightAlexLy/doc.git,在github上面添加origin
  • git push -u origin master ,将代码同步至github。
  • 上面一步报错可能需要执行git pull --rebase origin

git提交每次都输入密码

查看git origin的地址:  git remote -v

 git remote rm origin
 git remote add origin https://username:password@github.com/username/test.git
 git push origin master

git 错误: Unable to find remote helper for ‘https’解决方法

 vi /etc/profile
添加"export PATH=$PATH:/usr/libexec/git-core"

source /etc/profile

或者是安装问题

make prefix=/usr all doc info ;# as yourself
make prefix=/usr install install-doc install-html install-info ;# as root

git 回滚远程仓库提交

  先通过  git log  查找要回退的 节点(commit_hash)

git reset --hard commit_hash

git push origin HEAD --force

 

Git 问题小结

原文:https://www.cnblogs.com/LuisYang/p/9362687.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!