@@ -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' )
8484sandbox.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
9999await 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
107104await 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
117112sandbox.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
126118sandbox.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({
173163await 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
179169import os
@@ -186,7 +176,7 @@ sandbox.git.dangerously_authenticate(
186176
187177# After this, HTTPS git operations can use the stored credentials.
188178sandbox.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