I am currently taking the course GIT and GITHUB from udacity. One thing I'm really confused is what is the difference between remote and branch as both makes the same sense to me, as per my understanding.
3 Answers
To be precise here, let's use Git's own documentation on What a Branch Is:
A branch in Git is simply a lightweight movable pointer to one of these commits.
A branch in Git is just a pointer to a commit. Typically, this commit will in turn be connected with other commits in a chain or branching chain structure. When we usually think of branches, we think of collections of commits logically ordered in some way, but technically speaking a branch is just a pointer to a commit.
Again, from the documentation on Working with Remotes:
Remote repositories are versions of your project that are hosted on the Internet or network somewhere
The remote, which is really just short for remote repository, is a central place where branches and their commits are stored. The remote can also have branches, but typically you don't interact directly with these remote branches. Instead, there are local remote tracking branches, which, as their name implies, track the true state of the branches on the actual remote.

- 502,043
- 27
- 286
- 360
-
To be extra-precise, those are the Pro Git book terms. They're *meant* to match the Git terms, but Git itself is kind of fast-and-loose with the word "branch". – torek Nov 24 '16 at 04:22
They are totally different concepts.
A remote is basically a location where a copy of the repository is stored. So for example you could have one remote in GitHub, another in BitBucket, another in Kelly's PC, etc.
A branch in your repository means that you have temporarily made some changes that you don't want to put into the main branch just yet because you aren't done with it (or for other reasons). They can be local, so that your remotes never see them, or you can push the branch to the remotes.

- 16,584
- 9
- 85
- 130
Branches can be local or remote. Local branches are tracked by remote branches.

- 105
- 5