We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0700c9e commit 025dc8aCopy full SHA for 025dc8a
1 file changed
extensions/git/src/commands.ts
@@ -2005,9 +2005,17 @@ export class CommandCenter {
2005
const remotes = repository.remotes;
2006
2007
if (remotes.length === 0) {
2008
- if (!pushOptions.silent) {
2009
- window.showWarningMessage(localize('no remotes to push', "Your repository has no remotes configured to push to."));
+ if (pushOptions.silent) {
+ return;
2010
+ }
2011
+
2012
+ const addRemote = localize('addremote', 'Add Remote');
2013
+ const result = await window.showWarningMessage(localize('no remotes to push', "Your repository has no remotes configured to push to."), addRemote);
2014
2015
+ if (result === addRemote) {
2016
+ await this.addRemote(repository);
2017
}
2018
2019
return;
2020
2021
0 commit comments