Skip to content

Commit 6650624

Browse files
rm optional params
1 parent 8071733 commit 6650624

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

docs/git.mdx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ await sandbox.git.commit('/workspace/repo', 'Initial commit', {
8080
})
8181
```
8282
```python Python
83-
sandbox.git.add('/workspace/repo', all=True)
83+
sandbox.git.add('/workspace/repo')
8484
sandbox.git.commit(
8585
'/workspace/repo',
8686
'Initial commit',
@@ -97,16 +97,11 @@ For private repositories over HTTP(S), pass `username` and `password` (token) to
9797
<CodeGroup>
9898
```js JavaScript & TypeScript
9999
await sandbox.git.push('/workspace/repo', {
100-
remote: 'origin',
101-
branch: 'main',
102-
setUpstream: true,
103100
username: process.env.GIT_USERNAME,
104101
password: process.env.GIT_TOKEN,
105102
})
106103

107104
await sandbox.git.pull('/workspace/repo', {
108-
remote: 'origin',
109-
branch: 'main',
110105
username: process.env.GIT_USERNAME,
111106
password: process.env.GIT_TOKEN,
112107
})
@@ -116,17 +111,12 @@ import os
116111

117112
sandbox.git.push(
118113
'/workspace/repo',
119-
remote='origin',
120-
branch='main',
121-
set_upstream=True,
122114
username=os.environ.get('GIT_USERNAME'),
123115
password=os.environ.get('GIT_TOKEN'),
124116
)
125117

126118
sandbox.git.pull(
127119
'/workspace/repo',
128-
remote='origin',
129-
branch='main',
130120
username=os.environ.get('GIT_USERNAME'),
131121
password=os.environ.get('GIT_TOKEN'),
132122
)
@@ -173,7 +163,7 @@ await sandbox.git.dangerouslyAuthenticate({
173163
await sandbox.git.clone('https://git.example.com/org/private-repo.git', {
174164
path: '/workspace/repo',
175165
})
176-
await sandbox.git.push('/workspace/repo', { remote: 'origin', branch: 'main' })
166+
await sandbox.git.push('/workspace/repo')
177167
```
178168
```python Python
179169
import os
@@ -186,7 +176,7 @@ sandbox.git.dangerously_authenticate(
186176

187177
# After this, HTTPS git operations can use the stored credentials.
188178
sandbox.git.clone('https://git.example.com/org/private-repo.git', path='/workspace/repo')
189-
sandbox.git.push('/workspace/repo', remote='origin', branch='main')
179+
sandbox.git.push('/workspace/repo')
190180
```
191181
</CodeGroup>
192182

0 commit comments

Comments
 (0)