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

GitHub实战系列汇总:http://www.cnblogs.com/dunitian/p/5038719.html

——————————————————————————————————————————————————————

很多人问,明明有git gui 和 github可以直接图形化操作的吗?全部指令干啥???

呃(⊙o⊙)…呃(⊙o⊙)… ===> 装逼~

O(∩_∩)O~,开玩笑的,其实就是为了通用和熟悉git,linux里面照样这样用,多熟悉点基础指令很有用的,

如果觉得顿时不开心了、无爱了==>推荐你快速入门:http://www.imooc.com/learn/390

———————————————————————————————————————————————————————

实例1:

1.上面步骤和昨天一样,先在github里面新建一个项目,然后clone一份到本地(我这边就不重新截图了,引用一下昨天的步骤

10.在github里面创建一个公开仓库(私有的收费)并初始化仓库(最下面的复选框,最下面的两个下拉列表后面说)


————————————————————————————————————————
11.复制一份github ssh库的地址,一会儿有用


————————————————————————————————————————
12.克隆一份到本地

git clone git@github.com:dunitian/test.git(刚才的地址)

————————————————————————————————————————
Cloning into 'test'...
Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hosts.
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (3/3), done.
Checking connectivity... done.
————————————————————————————————————————

=======================开始~==========================================

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

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


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

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里面


1

2

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

$ git push

———————————————————————记录1———————————————————————————————————


1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

DNT@DESKTOP-PTACRF6 MINGW64 ~

$ git clone git@github.com:dunitian/Windows10.git

Cloning into 'Windows10'...

Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts.

warning: You appear to have cloned an empty repository.

Checking connectivity... done.

 

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)"

[master (root-commit) 1bb5aa4] 逆天WP-Win10开发笔记源码(学习ing)

 990 files changed, 64617 insertions(+)

 create mode 100644 00.HelloWorld/00.HelloWorld.csproj

 create mode 100644 00.HelloWorld/00.HelloWorld.csproj.user

 create mode 100644 00.HelloWorld/App.xaml

  

 create mode 100644 packages/repositories.config

 

DNT@DESKTOP-PTACRF6 MINGW64 ~/Windows10 (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: 729, done.

Delta compression using up to 8 threads.

Compressing objects: 100% (681/681), done.

Writing objects: 100% (729/729), 5.58 MiB | 31.00 KiB/sdone.

Total 729 (delta 470), reused 0 (delta 0)

To git@github.com:dunitian/Windows10.git

 * [new branch]      master -> master

———————————————————————记录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
————————————————————————————————————————

时间: 2024-08-04 06:02:36

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

GitHub实战系列~3.提交github的时候过滤某些文件 2015-12-10

GitHub实战系列汇总:http://www.cnblogs.com/dunitian/p/5038719.html ------------------------------------------------------ 很多人问,明明有git gui 和 github可以直接图形化操作的吗?全部指令干啥??? 呃(⊙o⊙)-呃(⊙o⊙)- ===> 装逼~ O(∩_∩)O~,开玩笑的,其实就是为了通用和熟悉git,linux里面照样这样用,多熟悉点基础指令很有用的, 如果觉得顿时不开心

GitHub实战系列~1.环境部署+创建第一个文件 2015-12-9

GitHub实战系列汇总:http://www.cnblogs.com/dunitian/p/5038719.html ------------------------------------------------------ 很多人问,明明有git gui 和 github可以直接图形化操作的吗?全部指令干啥??? 呃(⊙o⊙)-呃(⊙o⊙)- ===> 装逼~ O(∩_∩)O~,开玩笑的,其实就是为了通用和熟悉git,linux里面照样这样用,多熟悉点基础指令很有用的, 如果觉得顿时不开心

07.GitHub实战系列~7.Git之VS2013团队开发(如果不想了解git命令直接学这篇即可)

GitHub实战系列汇总:http://www.cnblogs.com/dunitian/p/5038719.html ------------------------------------------------------ 直接实战~(如果你之前安装了git其他版本都可以卸载了~这个就够了[而且是汉化的哦~]) 1.在github创建一个项目(不要添加 .gitignore 文件[vs默认会替你添加]) 2.打开vs,打开视图 "团队资源管理器" (点"房子"

05.GitHub实战系列~5.发布版本之分支操作+Tag讲解 2015-12-14

GitHub实战系列汇总:http://www.cnblogs.com/dunitian/p/5038719.html ------------------------------------------------------ 很多人问,明明有git gui 和 github可以直接图形化操作的吗?全部指令干啥??? 呃(⊙o⊙)-呃(⊙o⊙)- ===> 装逼~ O(∩_∩)O~,开玩笑的,其实就是为了通用和熟悉git,linux里面照样这样用,多熟悉点基础指令很有用的, 如果觉得顿时不开心

GitHub实战系列~4.把github里面的库克隆到指定目录+日常使用 2015-12-11

GitHub实战系列汇总:http://www.cnblogs.com/dunitian/p/5038719.html ------------------------------------------------------ 很多人问,明明有git gui 和 github可以直接图形化操作的吗?全部指令干啥??? 呃(⊙o⊙)-呃(⊙o⊙)- ===> 装逼~ O(∩_∩)O~,开玩笑的,其实就是为了通用和熟悉git,linux里面照样这样用,多熟悉点基础指令很有用的, 如果觉得顿时不开心

使用ASP.NET Web Api构建基于REST风格的服务实战系列教程【开篇】【持续更新中。。。】

原文:使用ASP.NET Web Api构建基于REST风格的服务实战系列教程[开篇][持续更新中...] 最近发现web api很火,园内也有各种大神已经在研究,本人在asp.net官网上看到一个系列教程,原文地址:http://bitoftech.net/2013/11/25/detailed-tutorial-building-asp-net-web-api-restful-service/.于是打算跟着学一下,把学习过程记录在博客园的同时也分享给大家. 每一篇结束后我都会把代码共享 由于

使用ASP.NET Web Api构建基于REST风格的服务实战系列教程【五】——在Web Api中实现Http方法(Put,Post,Delete)

原文:使用ASP.NET Web Api构建基于REST风格的服务实战系列教程[五]--在Web Api中实现Http方法(Put,Post,Delete) 系列导航地址http://www.cnblogs.com/fzrain/p/3490137.html 前言 在Web Api中,我们对资源的CRUD操作都是通过相应的Http方法来实现--Post(新增),Put(修改),Delete(删除),Get(查询).查询在前几章我们已经实现了,本章就在我们的案列(CourseController)

8.GitHub实战系列~8.使用GitHub建立自己的免费博客

github实战汇总:http://www.cnblogs.com/dunitian/p/5038719.html 创建一个用户名.github.io的仓库 选择设置页面风格 页面基本信息 选择一个你喜欢的风格 访问用户名.github.io 以后你直接添加文件到本地库然后推送到远程就可以了 ~eg:

06.GitHub实战系列~6.过滤器过滤掉的文件如何上传

比如我想发布一个软件版本供普通人下载: Git库建立了VS的过滤规则后 dll 和 exe 是自动过滤的,这时候我们得加参数(看图)git add xxx -f