I've got an old repo on my machine that I cloned some time ago, and want to know where it would push to if I ran:
git push
How can I tell where it will push to?
I've got an old repo on my machine that I cloned some time ago, and want to know where it would push to if I ran:
git push
How can I tell where it will push to?
 
    
    To display the URL of origin:
git config --get remote.origin.url
origin which is where git push (with no parameters) will push to. The command git remote show origin will also list branch information. The push location can be overridden if you've set branch.*.remote for the current branch.
You can also run git push --dry-run, which will show you more information about what the push will do. Also, you can manually specify the remote repo by adding it as a parameter to the push command.
 
    
    It appears that
git remote -v
will show where it will push to....
For example, I ran it in my repo, and it showed the following:
origin  https://some_remote_server/bparks/test-project.git (fetch)
origin  https://some_remote_server/bparks/test-project.git (push)
which seems to suggest what it would push too...
