Skip to content

Conversation

phlkchan
Copy link

When working in a git repo without a remote branch, "gg s" will output errors like:

$ gg s
fatal: no upstream configured for branch 'master'
[master -> /master|0220999] init commit, example.html from webtorrent.io Get Started page

fatal: No remote repository specified.  Please, specify either a URL or a
remote name from which new revisions should be fetched.
fatal: no upstream configured for branch 'master'
fatal: no upstream configured for branch 'master'
fatal: no upstream configured for branch 'master'
fatal: ambiguous argument 'master.../master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
position |  commits ahead of remote (push)
staging  | not all changes staged (add changes)
commits  | all changes committed

commits ahead (to push):
Could not find a tracked remote branch, please specify <upstream> manually.
usage: git cherry [-v] [<upstream> [<head> [<limit>]]]

    --abbrev[=<n>]        use <n> digits to display SHA-1s
    -v, --verbose         be verbose

 [master|]

files modified:
 |- example.html

Simple fix by checking if "git remote" outputs anything, if not, don't do anything that's related to remote repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant