github


Root /e/PlayData/git/demo1 (master) $ git remote add origin https://github.com/fadewalk/test.git Root /e/PlayData/git/demo1 (master) $ git push -u origin master # 直接将本地的push合并 Enumerating objects: 38, done. Counting objects: 100% (38/38), done. Delta compression using up to 8 threads Compressing objects: 100% (29/29), done. Writing objects: 100% (38/38), 3.33 KiB | 121.00 KiB/s, done. Total 38 (delta 11), reused 0 (delta 0) remote: Resolving deltas: 100% (11/11), done. remote: remote: Create a pull request for 'master' on GitHub by visiting: remote: https://github.com/fadewalk/test/pull/new/master remote: To https://github.com/fadewalk/test.git * [new branch] master -> master Branch 'master' set up to track remote branch 'master' from 'origin'. Root /e/PlayData/git/demo1 (master) $ git branch -r # 远程只有master origin/master # 另外的地方 无法获取dev 分支 Root /e/PlayData/git/demo1 (master) $ git branch bug_001 dev2 * master Root /e/PlayData/git/demo1 (master) $ git checkout dev2 Switched to branch 'dev2' Root /e/PlayData/git/demo1 (dev2) $ git branch bug_001 * dev2 master Root /e/PlayData/git/demo1 (dev2) #将本地的dev2 分支push 上去 $ git push -u origin dev2 Enumerating objects: 8, done. Counting objects: 100% (8/8), done. Delta compression using up to 8 threads Compressing objects: 100% (5/5), done. Writing objects: 100% (6/6), 619 bytes | 123.00 KiB/s, done. Total 6 (delta 2), reused 0 (delta 0) remote: Resolving deltas: 100% (2/2), completed with 1 local object. remote: remote: Create a pull request for 'dev2' on GitHub by visiting: remote: https://github.com/fadewalk/test/pull/new/dev2 remote: To https://github.com/fadewalk/test.git * [new branch] dev2 -> dev2 Branch 'dev2' set up to track remote branch 'dev2' from 'origin'. Root /e/PlayData/git/demo1 (dev2) $ git branch -r # 现在远端有dev,可以供别的,拉取 origin/dev2 origin/master git pull 更新远程分支 (use "git pull" to merge the remote branch into yours)
84
84
 
1
Root /e/PlayData/git/demo1 (master)
2
$ git remote add origin https://github.com/fadewalk/test.git
3
Root /e/PlayData/git/demo1 (master)
4
$ git push -u origin master                                        # 直接将本地的push合并
5
Enumerating objects: 38, done.
6
Counting objects: 100% (38/38), done.
7
Delta compression using up to 8 threads
8
Compressing objects: 100% (29/29), done.
9
Writing objects: 100% (38/38), 3.33 KiB | 121.00 KiB/s, done.
10
Total 38 (delta 11), reused 0 (delta 0)
11
remote: Resolving deltas: 100% (11/11), done.
12
remote:
13
remote: Create a pull request for 'master' on GitHub by visiting:
14
remote: https://github.com/fadewalk/test/pull/new/master
15
remote:
16
To https://github.com/fadewalk/test.git
17
 * [new branch] master -> master
18
Branch 'master' set up to track remote branch 'master' from 'origin'.
19
20
21
Root /e/PlayData/git/demo1 (master)
22
$ git branch -r                                # 远程只有master
23
 origin/master                                # 另外的地方 无法获取dev 分支
24
25
Root /e/PlayData/git/demo1 (master)
26
$ git branch
27
 bug_001
28
 dev2
29
* master
30
31
Root /e/PlayData/git/demo1 (master)
32
$ git checkout dev2
33
Switched to branch 'dev2'
34
35
Root /e/PlayData/git/demo1 (dev2)
36
$ git branch
37
 bug_001
38
* dev2
39
 master
40
41
Root /e/PlayData/git/demo1 (dev2)                    #将本地的dev2 分支push 上去
42
$ git push -u origin dev2
43
Enumerating objects: 8, done.
44
Counting objects: 100% (8/8), done.
45
Delta compression using up to 8 threads
46
Compressing objects: 100% (5/5), done.
47
Writing objects: 100% (6/6), 619 bytes | 123.00 KiB/s, done.
48
Total 6 (delta 2), reused 0 (delta 0)
49
remote: Resolving deltas: 100% (2/2), completed with 1 local object.
50
remote:
51
remote: Create a pull request for 'dev2' on GitHub by visiting:
52
remote: https://github.com/fadewalk/test/pull/new/dev2
53
remote:
54
To https://github.com/fadewalk/test.git
55
 * [new branch] dev2 -> dev2
56
Branch 'dev2' set up to track remote branch 'dev2' from 'origin'.
57
58
Root /e/PlayData/git/demo1 (dev2)
59
$ git branch -r                                    # 现在远端有dev,可以供别的,拉取
60
 origin/dev2
61
 origin/master
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
git pull 更新远程分支
80
(use "git pull" to merge the remote branch into yours)
81
82
83
84