Monorepo for Tangled tangled.org
856
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: fix mirroring information about git pushurl #339

open opened by fabricio.dev targeting master from fabricio.dev/core: fix/docs-pushurl

I was passing through that docs section yesterday and I notice that adding a pushurl does not actually replaces the url. Git will leave the url there but uses it for fetch solely, we still need to add both pushurl to push to both places.

I think changing the text would look more correct.

I also add a bit of tag lang to the markdown, a URL to git-push official docs, and fix a bit the examples to make them more consistent.

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:rlkxmeu3fevpzevkduvphfet/sh.tangled.repo.pull/3ml7cbwice422
+16 -17
Diff #1
+16 -17
docs/DOCS.md
··· 170 170 171 171 You'll see something like: 172 172 173 - ``` 174 - origin git@github.com:username/my-project (fetch) 175 - origin git@github.com:username/my-project (push) 173 + ```bash 174 + origin git@github.com:username/my-project.git (fetch) 175 + origin git@github.com:username/my-project.git (push) 176 176 ``` 177 177 178 178 Update the remote URL to point to tangled: ··· 189 189 190 190 You should now see: 191 191 192 - ``` 192 + ```bash 193 193 origin git@tangled.org:user.tngl.sh/my-project (fetch) 194 194 origin git@tangled.org:user.tngl.sh/my-project (push) 195 195 ``` ··· 209 209 If you want to maintain your repository on multiple forges 210 210 simultaneously, for example, keeping your primary repository 211 211 on GitHub while mirroring to Tangled for backup or 212 - redundancy, you can do so by adding multiple remotes. 212 + redundancy, you can do so by adding [multiple remotes](https://git-scm.com/docs/git-push#_remotes). 213 213 214 214 You can configure your local repository to push to both 215 215 Tangled and, say, GitHub. You may already have the following 216 216 setup: 217 217 218 - ``` 218 + ```bash 219 219 $ git remote -v 220 - origin git@github.com:username/my-project (fetch) 221 - origin git@github.com:username/my-project (push) 220 + origin git@github.com:username/my-project.git (fetch) 221 + origin git@github.com:username/my-project.git (push) 222 222 ``` 223 223 224 224 Now add Tangled as an additional push URL to the same ··· 229 229 ``` 230 230 231 231 You also need to re-add the original URL as a push 232 - destination (Git replaces the push URL when you use `--add` 233 - the first time): 232 + destination (Git will now use the original URL to fetch only): 234 233 235 234 ```bash 236 - git remote set-url --add --push origin git@github.com:username/my-project 235 + git remote set-url --add --push origin git@github.com:username/my-project.git 237 236 ``` 238 237 239 238 Verify your configuration: 240 239 241 - ``` 240 + ```bash 242 241 $ git remote -v 243 - origin git@github.com:username/repo (fetch) 244 - origin git@tangled.org:username/my-project (push) 245 - origin git@github.com:username/repo (push) 242 + origin git@github.com:username/my-project.git (fetch) 243 + origin git@tangled.org:user.tngl.sh/my-project (push) 244 + origin git@github.com:username/my-project.git (push) 246 245 ``` 247 246 248 247 Notice that there's one fetch URL (the primary remote) and ··· 267 266 you can maintain separate remotes: 268 267 269 268 ```bash 270 - git remote add github git@github.com:username/my-project 271 - git remote add tangled git@tangled.org:username/my-project 269 + git remote add github git@github.com:username/my-project.git 270 + git remote add tangled git@tangled.org:user.tngl.sh/my-project 272 271 ``` 273 272 274 273 Then push to each explicitly:

History

2 rounds 0 comments
sign up or login to add to the discussion
1 commit
expand
docs: fix mirroring information about git pushurl
merge conflicts detected
expand
  • docs/DOCS.md:170
expand 0 comments
1 commit
expand
docs: fix mirroring information about git pushurl
expand 0 comments