您的位置:首页 > 其它

工具-git使用及总结

2018-03-27 18:19 309 查看

1. 学习资源

1.廖雪峰git学习
[https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/00137628548491051ccfaef0ccb470894c858999603fedf000](https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/00137628548491051ccfaef0ccb470894c858999603fedf000)

2.赛诚团队git使用指南
[https://albertlin1102.gitbooks.io/sc_git_guide/](https://albertlin1102.gitbooks.io/sc_git_guide/)

3.git hub 使用
[https://github.com/github/hub/releases](https://github.com/github/hub/releases)


2. 学习总结

常用的语句:
git clone,
git add,
git commit -m "",
git checkout -b,
git merge,
git branch -d,
git rm
剩下的,在实际中遇到问题,可以参考以上资源


3. 学习过程中问题记录及汇总

1.github上传时出现error: src refspec master does not match any解决办法
参考:[https://www.jianshu.com/p/8d26730386f3](https://www.jianshu.com/p/8d26730386f3)


2.git 查看、删除、重命名远程分支
参考:[https://blog.zengrong.net/post/1746.html](https://blog.zengrong.net/post/1746.html)


3.Git中从远程的分支获取最新的版本到本地有这样2个命令,并区分git fetch和git pull
[https://blog.csdn.net/hudashi/article/details/7664457](https://blog.csdn.net/hudashi/article/details/7664457)


4.pull request 语句脚本
[https://github.com/github/hub/issues/1219](https://github.com/github/hub/issues/1219)


5.error: src refspec master does not match any.
解决的思路:在刚开始的时候,commit -m “” 中的内容不能为空,否则就报以上错误


6.error: Invalid value for --rebase: equest
Administrator@uf1054201501094 MINGW32 ~/Desktop/jc/test (dev)
问题操作:
$ pr(){
> git push -u origin "$1"
> hub`** pull -request**` -h "$1" -F - 这个地方是错误的
> }

Administrator@uf1054201501094 MINGW32 ~/Desktop/jc/test (dev)
$ pr "dev" <<MSG
> add a.txt
> MSG

解决:
$ pr() {
> git push -u origin "$1"
> hub pull-request -h "$1" -F -
> }

Administrator@uf1054201501094 MINGW32 ~/Desktop/jc/test (dev)
$ pr "dev"<<MSG
> A
> MSG
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: