Difference between alias and branch in git
What is the difference between an alias and branch?
3 Solutions collect form web for “Difference between alias and branch in git”
[alias] is your Primary remote repository‘s alias. And
[branch] is your branch name of the project.
For example, I have a repo(let’s say, yourRepo) on github, and its primary remote repository is
You’ll often do
git remote add origin email@example.com:user/yourRepo.git
to add it to your local repo. Then you can push your update to github by
git push origin master
origin is often used as alias for
primary remote repository.
There’re still some other type of alias for git. For example, you can do
git config alias.com commit
com alias to
commit. The alias here is not the
[alias] in your question. I just mentioned it by the way. Maybe you’ll like it. 😉
alias I think you mean
So a typical command you’d run might be
git push origin master. Where
origin is the name of the repository you are pushing to and
master is the branch name to push.
You can create your own aliases for branches. If you feel for it, you can make an alias for the
master branch called