I am a newbie of git, I try to understand what is origin and origin/master in git, what does the origin means? where it is? and someone says it is remote branch, what is the remote branch?
            Asked
            
        
        
            Active
            
        
            Viewed 1.9k times
        
    4
            
            
        - 
                    possible duplicate of [What is `origin` in git?](http://stackoverflow.com/questions/9529497/what-is-origin-in-git) – Lazy Badger Mar 02 '12 at 10:53
- 
                    possible duplicate of [what's mean 'origin' when git push](http://stackoverflow.com/questions/5270760/whats-mean-origin-when-git-push) – Fred Foo Mar 12 '12 at 13:27
2 Answers
9
            origin is the default name given to the remote repository from which your local repository was cloned. origin/master is the master branch of that repository, which (by default) your local master branch will track.
 
    
    
        Graham Borland
        
- 60,055
- 21
- 138
- 179
3
            
            
        See the ProGit book and Working with Remotes. Origin usually refers to the git repository that you cloned from.
git fetch origin
git merge origin/master
to fetch changes from the original repo.
git push origin master
to push from your local master branch to origin (and its master branch). You have to have commit rights to be able to do this.
Github's help is really great as well and describes how to add your own remotes (like an upstream remote after you fork a project).
 
    
    
        Daniel Lee
        
- 7,709
- 2
- 48
- 57