If you want only the remote URL, or if your are not connected to a network that can reach the remote repo:
git config --get remote.origin.url
If you require full output and you are on a network that can reach the remote repo where the origin resides :
git remote show origin
When using git clone
(from GitHub, or any source repository for that matter) the default name for the source of the clone is “origin”. Using git remote show
will display the information about this remote name. The first few lines should show:
C:\Users\jaredpar\VsVim> git remote show origin * remote origin Fetch URL: [email protected]:jaredpar/VsVim.git Push URL: [email protected]:jaredpar/VsVim.git HEAD branch: master Remote branches:
If you want to use the value in the script, you would use the first command listed in this answer.
Related Posts:
- Why does Git tell me “No such remote ‘origin'” when I try to push to origin?
- GitHub: Permission denied (publickey). fatal: Could not read from remote repository
- git error: failed to push some refs to remote
- Git error: “Please make sure you have the correct access rights and the repository exists”
- Untrack files from git temporarily
- Git, fatal: The remote end hung up unexpectedly
- Git – remote: Repository not found
- Pushing to Git returning Error Code 403 fatal: HTTP request failed
- Git master branch has no upstream branch
- How to pull from one remote branch to another branch in git?
- Trying to git pull with error: cannot open .git/FETCH_HEAD: Permission denied
- How to git add a whole folder
- What does ‘git remote add upstream’ help achieve?
- git status (nothing to commit, working directory clean), however with changes commited
- How can I rollback a git repository to a specific commit?
- How to remove a directory from git repository?
- gpg failed to sign the data fatal: failed to write commit object
- Git pull origin
overwrites master? - Git merge with force overwrite
- Git Push ERROR: Repository not found
- git returns http error 407 from proxy after CONNECT
- Git pull till a particular commit
- Does Git Add have a verbose switch
- Why does Git say my master branch is “already up to date” even though it is not?
- Git Clone – Repository not found
- git SSL certificate- Invalid certificate chain while accessing
- Git push existing repo to a new and different remote repo server?
- What is .gitignore exactly?
- How do I delete a Git branch locally and remotely?
- error: src refspec master does not match any
- How can I switch to another branch in git?
- git – remote add origin vs remote set-url origin
- How do I push a new local branch to a remote Git repository and track it too?
- How do I push a new local branch to a remote Git repository and track it too?
- Updating a local repository with changes from a GitHub repository
- Git push results in “Authentication Failed”
- github changes not staged for commit
- Git push results in “Authentication Failed”
- Download single files from GitHub
- How to draw checkbox or tick mark in GitHub Markdown table?
- How do I pull my project from github?
- Difference between Git and GitHub
- Is it safe to download code from GitHub?
- How to draw checkbox or tick mark in GitHub Markdown table?
- How to change the URI (URL) for a remote Git repository?
- How to upload folders on GitHub
- How to find my GitHub username so that I can be found via the URL?
- github website publish cannot publish unborn HEAD
- Superscript in markdown (Github flavored)?
- Create a tag in a GitHub repository
- Git: Could not resolve host github.com error while cloning remote repository in git
- How to pull a specific branch from Github
- GitHub: invalid username or password
- “Cannot publish, unborn head” error message
- Trying to git pull with error: cannot open .git/FETCH_HEAD: Permission denied
- How do I update or sync a forked repository on GitHub?
- There is no tracking information for the current branch
- Git push results in “Authentication Failed”
- How do I create a folder in a GitHub repository?
- “*** Please tell me who you are.” when using SSH key
- Pull request vs Merge request
- Clone A Private Repository (Github)
- What do raw.githubusercontent.com URLs represent?
- Superscript in markdown (Github flavored)?
- error: cannot lock ref.. ‘refs/tags’ exists; cannot create ‘refs/tags/
- ! [rejected] master -> master (fetch first)
- How to git add a whole folder
- Where can I find the GitHub ID in my account?
- how to un fork the github repository?
- How do I set up Eclipse/EGit with GitHub?
- Create a new file in git bash
- Repository size limits for GitHub.com
- Why I always Got Error “Push to origin/master was rejected”?
- Github Windows ‘Failed to sync this branch’
- Git keeps prompting me for a password
- git push origin master does not work
- Delete forked repo from GitHub
- Found a swap file by the name
- How to install Git for Cygwin?
- Could not create work tree dir ‘example.com’.: Permission denied
- key_load_public: invalid format
- Git push hangs when pushing to Github?
- Issue with SourceTree while cloning a GitHub repository
- How do I run and compile this github project on my pc?
- Git push requires username and password
- Is Git/GitHub a good WordPress deployment solution?
- GIT and Development URL’s point to production
- GitHub .md files to WordPress pages
- WordPress Premium Plugin (3rd Party Github User)
- Have WP Theme update from Git Repository
- Pull latest stable release via git [closed]
- Git Hosting for WordPress SVN Plugin Repository [closed]
- how to embed or share a gits in my blog wordpress?
- Wordpres core-update theme renames theme folder name
- How to persist custom posts, custom fields and styles on a Github repository?
- What is the wordpress Git hub Repo master on beta?
- Post via git repository
- How to use one git (github) repository for version control for multiple themes
- How to host your WordPress theme on github and make my theme updatable for my client
- how can I create a WP offline environment before releasing the websites? [closed]