前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >GitHub实战系列~2.把本地项目提交到github中 2015-12-10

GitHub实战系列~2.把本地项目提交到github中 2015-12-10

作者头像
逸鹏
发布2018-04-09 16:16:39
5840
发布2018-04-09 16:16:39
举报
文章被收录于专栏:逸鹏说道逸鹏说道

实例:

1.上面步骤和昨天一样,先在github里面新建一个项目,然后clone一份到本地

2.把本地文件拖到git项目文件夹里面(后面讲怎么过滤文件)

3.打开git bash 进入项目文件夹,添加全部(*) 提交

代码语言:javascript
复制
DNT@DESKTOP-PTACRF6 MINGW64 ~
$ cd Windows10/

DNT@DESKTOP-PTACRF6 MINGW64 ~/Windows10 (master)
$ ls

DNT@DESKTOP-PTACRF6 MINGW64 ~/Windows10 (master)
$ ls
00.HelloWorld/   02.XAMLBaseDKill/  04.MyProgram/    AppTest/   Win10开发.sln  Win10开发.v12.suo
01.MyCommonAPP/  03.MyDivApp/       05.AllControls/  packages/  Win10开发.suo

DNT@DESKTOP-PTACRF6 MINGW64 ~/Windows10 (master)
$ git add *

DNT@DESKTOP-PTACRF6 MINGW64 ~/Windows10 (master)
$ git commit -m "逆天WP-Win10开发笔记源码(学习ing)"

4.push到github里面

代码语言:javascript
复制
DNT@DESKTOP-PTACRF6 MINGW64 ~/Windows10 (master)
$ git push

———————记录2—————————————— DNT_PC@DNT_PC-PC MINGW32 /d/gitworks/test (master) $ git commit -m "直接添加本地文件库到github" [master f33514f] 直接添加本地文件库到github 2 files changed, 223 insertions(+) create mode 100644 "\345\221\275\344\273\244.txt" create mode 100644 "\350\256\260\345\275\225.txt"

DNT_PC@DNT_PC-PC MINGW32 /d/gitworks/test (master) $ git push warning: push.default is unset; its implicit value has changed in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the traditional behavior, use:

git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

git config --global push.default simple

When push.default is set to 'matching', git will push local branches to the remote branches that already exist with the same name.

Since Git 2.0, Git defaults to the more conservative 'simple' behavior, which only pushes the current branch to the corresponding remote branch that 'git pull' uses to update the current branch.

See 'git help config' and search for 'push.default' for further information. (the 'simple' mode was introduced in Git 1.7.11. Use the similar mode 'current' instead of 'simple' if you sometimes use older versions of Git)

Counting objects: 4, done. Compressing objects: 100% (4/4), done. Writing objects: 100% (4/4), 3.91 KiB | 0 bytes/s, done. Total 4 (delta 0), reused 0 (delta 0) To git@github.com:dunitian/test.git 4e69105..f33514f master -> master ————————————————————————————————————————

本文参与 腾讯云自媒体分享计划,分享自微信公众号。
原始发表:2015-12-11,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 我为Net狂 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档