origin
is an alias on your system for a particular remote repository. It’s not actually a property of that repository.
By doing
git push origin branchname
you’re saying to push to the origin
repository. There’s no requirement to name the remote repository origin
: in fact the same repository could have a different alias for another developer.
Remotes are simply an alias that store the URL of repositories. You can see what URL belongs to each remote by using
git remote -v
In the push
command, you can use remotes or you can simply use a URL directly. An example that uses the URL:
git push [email protected]:git/git.git master
Related Posts:
- How do I delete a Git branch locally and remotely?
- What does cherry-picking a commit with Git mean?
- How to use Git Revert
- How do I undo the most recent local commits in Git?
- Undo a Git merge that hasn’t been pushed yet
- How do I properly force a Git push?
- fatal: Not a git repository (or any of the parent directories): .git [duplicate]
- Git pushing to remote branch
- How do I undo ‘git add’ before commit?
- GitHub Error Message – Permission denied (publickey)
- How can I see the differences between two branches?
- Need to reset git branch to origin version
- What does “Changes not staged for commit” mean
- How do I push a new local branch to a remote Git repository and track it too?
- How do you push a tag to a remote repository using Git?
- Gitignore not working
- How can I merge multiple commits onto another branch as a single squashed commit?
- How do I resolve git saying “Commit your changes or stash them before you can merge”?
- Why does git say “Pull is not possible because you have unmerged files”?
- Pushing empty commits to remote
- How do I ignore an error on ‘git pull’ about my local changes would be overwritten by merge?
- Stash only one file out of multiple files that have changed with Git?
- What is git fast-forwarding? [duplicate]
- How to cherry-pick multiple commits
- fatal: The current branch master has no upstream branch
- Another git process seems to be running in this repository
- rejected master -> master (non-fast-forward)
- How to cherry-pick multiple commits
- Reset local repository branch to be just like remote repository HEAD
- merge one local branch into another local branch
- Move the most recent commit(s) to a new branch with Git
- What does “Git push non-fast-forward updates were rejected” mean?
- How do I diff the same file between two different commits on the same branch?
- You have not concluded your merge (MERGE_HEAD exists)
- How to get the current branch name in Git?
- Git error on commit after merge – fatal: cannot do a partial commit during a merge
- Can I share my private GitHub repository by link?
- Is there a command to undo git init?
- How to rename a directory/folder on GitHub website?
- Create a git patch from the uncommitted changes in the current working directory
- git push says “everything up-to-date” even though I have local changes
- Download a single folder or directory from a GitHub repo
- Is there a “git touch” so I can push the same file with a new timestamp?
- Branch from a previous commit using Git
- How to create a .gitignore file
- How do I rename a repository on GitHub?
- Hard reset of a single file
- git: fatal: Could not read from remote repository
- Why does git say “Pull is not possible because you have unmerged files”?
- git add remote branch
- How to see the changes between two commits without commits in-between?
- Git: Installing Git in PATH with GitHub client for Windows
- How to delete a stash created with git stash create?
- In a Git repository, how to properly rename a directory?
- How to “git clone” including submodules?
- Undo a git stash
- Undo git stash pop that results in merge conflict
- Set up git to pull and push all branches
- My new Github page isn’t showing up
- Why should I use core.autocrlf=true in Git?
- How can I add a blank directory to a Git repository?
- Git Extensions: Win32 error 487: Couldn’t reserve space for cygwin’s heap, Win32 error 0
- SourceTree keeps asking for Github password
- Is it possible to pull just one file in Git?
- Git lfs – “this exceeds GitHub’s file size limit of 100.00 MB”
- Git add all files modified, deleted, and untracked?
- How to switch back to ‘master’ with git?
- Aborting commit due to empty commit message
- Github Authentication Failed – … GitHub does not provide shell access
- How to update a branch with master on GitHub
- How do I pull files from remote without overwriting local files?
- How to keep a branch synchronized/updated with master?
- Can I arrange repositories into folders on Github?
- Completely cancel a rebase
- How to discard local changes and pull latest from GitHub repository
- Git: What’s the best practice to “git clone” into an existing folder?
- How to recover stashed uncommitted changes
- Git Pull is Not Possible, Unmerged Files
- Your repository has no remotes configured to push to
- Specify an SSH key for git push for a given domain
- Git merge reports “Already up-to-date” though there is a difference
- How do I “un-revert” a reverted Git commit?
- git-diff to ignore ^M
- Differences between Commit, Commit and Push, Commit and Sync
- How can I delete all Git branches which have been merged?
- git replace local version with remote version
- Where is git.exe located?
- How to find which git branch I am on when my disk is mounted on other server
- How to use Git and Dropbox together?
- How to modify a specified commit?
- How can I push a specific commit to a remote, and not previous commits?
- Git ignore local file changes
- Import existing source code to GitHub
- git checkout all the files
- Git Workflow for Large, Live Site?
- Add latest commit info on login footer using login_footer hook
- Git beginner: Keeping track of on-server changes
- Initial wordpress deploy via git
- How to use wordpress with Git?
- Is it possible to checkout a beta version of WordPress via github?