I'm newbie and starting use git for project.
I not notice the difference of "Branch" and "origin/Branch"
Please guide me.
Asked
Active
Viewed 1.5k times
8

Morteza M
- 167
- 1
- 3
- 12
-
2develop is a branch local in your pc, origin/develop is a branch in the repo – ΦXocę 웃 Пepeúpa ツ Jun 07 '17 at 08:47
-
`$ git branch develop developByMohammadEmad developByMohsen * developByMorteza master ` – Morteza M Jun 07 '17 at 08:51
-
`$ git branch -r origin/develop origin/developByMohammadEmad origin/developByMohsen origin/developByMorteza origin/master ` – Morteza M Jun 07 '17 at 08:52
-
`$ git branch -a develop developByMohammadEmad developByMohsen * developByMorteza master remotes/origin/develop remotes/origin/developByMohammadEmad remotes/origin/developByMohsen remotes/origin/developByMorteza remotes/origin/master` – Morteza M Jun 07 '17 at 08:55
-
1The most important thing you can do when you're new to git is learn about git, you should go read the [git pro](https://git-scm.com/book/en/v2) book, [check](https://try.github.io/levels/1/challenges/1) [out](http://rogerdudler.github.io/git-guide/) [various](https://www.atlassian.com/git/tutorials) [tutorials](https://git-scm.com/docs/gittutorial). – Lasse V. Karlsen Jun 07 '17 at 12:25
1 Answers
11
Branch
is your local branch and origin/Branch
is your remote branch.
To make sure which branches are local or remote just use the following git commands.
$ git branch # see local branches
$ git branch -r # see remote branches
$ git branch -a # see local and remote branches

Sajib Khan
- 22,878
- 9
- 63
- 73
-
When Should use `$git push origin/develop` And when `$git push develop`? – Morteza M Jun 07 '17 at 09:03
-
You never `push` to your local branch, it's updated by a `commit` or by a `pull` (simplified). – choroba Jun 07 '17 at 09:04
-
-
These commands are helpful to make sure which branches are local or remote. – Sajib Khan Jun 07 '17 at 09:16