8000 Create a commit to change an existing file · pythonthings/github3.py@45eadd1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 45eadd1

Browse files
author
cclauss
authored
Create a commit to change an existing file
1 parent 9d870bb commit 45eadd1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/examples/github.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ Creating a new repository
121121
if r:
122122
print("Created {0} successfully.".format(r.name))
123123

124+
Create a commit to change an existing file
125+
------------------------------------------
126+
127+
::
128+
129+
repo.contents('/README.md').update('commit message', 'file content'.encode('utf-8'))
130+
124131
Follow another user on GitHub
125132
-----------------------------
126133

0 commit comments

Comments
 (0)
0