So it also looks like we'll have to do two checks here: 1) check for use of local git config, 2) check for use of oauth token file.

```ruby
def set_oauth_token(oauth_token, options = {})
  oauth_token_file_or_token = if( oauth_token_file = options.delete(:oauth_token_file) )
                                File.open(oauth_token_file, 'w') { |f| f.write(oauth_token) }
                                "github.oauth-token-file #{oauth_token_file}"
                              else
                                "github.oauth-token #{oauth_token}"
                              end

  if options.delete(:local)
    `git config --replace-all #{oauth_token_file_or_token}`
  else
    `git config --global --replace-all #{oauth_token_file_or_token}`
end
```