Skip to content

Commit e33429f

Browse files
committed
change to HTTP url and fix formatting
1 parent 527646d commit e33429f

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

book/11-git-internals/sections/refspec.asc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ Suppose you add a remote like this:
66

77
[source,shell]
88
----
9-
$ git remote add origin git@github.com:schacon/simplegit-progit.git
9+
$ git remote add origin https://github.com/schacon/simplegit-progit
1010
----
1111

1212
It adds a section to your `.git/config` file, specifying the name of the remote (`origin`), the URL of the remote repository, and the refspec for fetching:
1313

1414
[source,ini]
1515
----
1616
[remote "origin"]
17-
url = https://github.com/schacon/simplegit-progit.git
17+
url = https://github.com/schacon/simplegit-progit
1818
fetch = +refs/heads/*:refs/remotes/origin/*
1919
----
2020

@@ -70,9 +70,9 @@ If you want to always fetch the master and experiment branches, add two lines:
7070
[source,ini]
7171
----
7272
[remote "origin"]
73-
url = git@github.com:schacon/simplegit-progit.git
74-
fetch = +refs/heads/master:refs/remotes/origin/master
75-
fetch = +refs/heads/experiment:refs/remotes/origin/experiment
73+
url = https://github.com/schacon/simplegit-progit
74+
fetch = +refs/heads/master:refs/remotes/origin/master
75+
fetch = +refs/heads/experiment:refs/remotes/origin/experiment
7676
----
7777

7878
You can't use partial globs in the pattern, so this would be invalid:
@@ -88,9 +88,9 @@ If you have a QA team that pushes a series of branches, and you want to get the
8888
[source,ini]
8989
----
9090
[remote "origin"]
91-
url = git@github.com:schacon/simplegit-progit.git
92-
fetch = +refs/heads/master:refs/remotes/origin/master
93-
fetch = +refs/heads/qa/*:refs/remotes/origin/qa/*
91+
url = https://github.com/schacon/simplegit-progit
92+
fetch = +refs/heads/master:refs/remotes/origin/master
93+
fetch = +refs/heads/qa/*:refs/remotes/origin/qa/*
9494
----
9595

9696
If you have a complex workflow process that has a QA team pushing branches, developers pushing branches, and integration teams pushing and collaborating on remote branches, you can namespace them easily this way.
@@ -112,9 +112,9 @@ If they want Git to do that automatically each time they run `git push origin`,
112112
[source,ini]
113113
----
114114
[remote "origin"]
115-
url = git@github.com:schacon/simplegit-progit.git
116-
fetch = +refs/heads/*:refs/remotes/origin/*
117-
push = refs/heads/master:refs/heads/qa/master
115+
url = https://github.com/schacon/simplegit-progit
116+
fetch = +refs/heads/*:refs/remotes/origin/*
117+
push = refs/heads/master:refs/heads/qa/master
118118
----
119119

120120
Again, this will cause a `git push origin` to push the local `master` branch to the remote `qa/master` branch by default.

0 commit comments

Comments
 (0)