美文网首页
github的代码上传

github的代码上传

作者: 戴码 | 来源:发表于2018-06-22 16:50 被阅读0次

程序员,不得不知道github。但是很人多在使用的时候,由于第一次用的时候各种报错,所以默默放弃的有没有。那么我们现在来直面一下我们怕的问题吧!

错误:

              fatal: Invalid refspec 'https://github.com/DaiWenqi/**.git'
              ! [rejected]        master -> master (non-fast-forward);

步骤:
1、git init 初始化
2、git add . 添加跟踪
3、git commit -m ‘描述文字’ 提交本地版本库
4、git remote add orgin(tag名字)path (github地址) 建立远程连接
5、git push origin master(远程仓库默认tag name :master or branch)

其实代码同步工具,就是把代码传到远程。git本地有个本地版本库,远程有个远程版本库。上传的时候,出错往往是两边代码出现不一样。远程通常有个readme.md,而本地没有这个文件。

使用命令 git pull --rebase origin master ,然后再git push origin master


That's ok! Let's try it,right now!

相关文章

  • Leetcode 88. Merge Sorted Array

    Python 3 实现: 源代码已上传 Github,持续更新。 源代码已上传至 Github,持续更新中。

  • Leetcode 21. Merge Two Sorted Li

    Python 3 实现: 源代码已上传 Github,持续更新。 源代码已上传至 Github,持续更新中。

  • Leetcode 9. Palindrome Number

    Python 3 实现: 源代码已上传 Github,持续更新。 源代码已上传至 Github,持续更新中。

  • Leetcode 4. Median of Two Sorted

    Python 3 实现: 源代码已上传 Github,持续更新。 源代码已上传至 Github,持续更新中。

  • 上传github 代码

    一、注册github账号 首先需要注册一个github账号,注册地址:https://github.com 接着会...

  • 代码上传github

    1.先在github上新建一个远程仓库,仓库名字一般写框架名字 2.将远程仓库上的代码(里面只有一些初始化的东西)...

  • 代码上传github

    1.首先注册github账号,登录,创建新仓库,点击+,点击new repository 2.填写仓库名,自己随便...

  • Github代码上传

    # Github代码上传 # ## 打开Github,注册账号,创建新的项目 ## https://github....

  • github的代码上传

    程序员,不得不知道github。但是很人多在使用的时候,由于第一次用的时候各种报错,所以默默放弃的有没有。那么我们...

  • Leetcode 64: Minimum Path Sum

    动态规划 Python 3 实现: 源代码已上传 Github,持续更新。 源代码已上传至 Github,持续更新中。

网友评论

      本文标题:github的代码上传

      本文链接:https://www.haomeiwen.com/subject/wlnkyftx.html