def edit(self, sha, force=github.GithubObject.NotSet):
assert isinstance(sha, (str, unicode)), sha<EOL>assert force is github.GithubObject.NotSet or isinstance(force, bool), force<EOL>post_parameters = {<EOL>"<STR_LIT>": sha,<EOL>}<EOL>if force is not github.GithubObject.NotSet:<EOL><INDENT>post_parameters["<STR_LIT>"] = force<EOL><DEDENT>headers, data = self._requester.requestJsonAndCheck(<EOL>"<STR_LIT>",<EOL>self.url,<EOL>input=post_parameters<EOL>)<EOL>self._useAttributes(data)<EOL>
:calls: `PATCH /repos/:owner/:repo/git/refs/:ref <http://developer.github.com/v3/git/refs>`_
:param sha: string
:param force: bool
:rtype: None