Do we really need to branch in Git?

Viewed 2495

I'm in my first software engineering class. It's the first time any of us has worked in a team and used git and github. In class our teacher told us that you should usually branch off the master, after you finish your new feature, merge it back to the master. This is what I've been doing. However the other members of my group are not branching. They pull from the master on github to their local machine, make edits, finish their feature on their local master, then push to the master on github.

I'm trying to convince them to branch but now that I think about it, i find it more confusing. I've been told that the purpose of the branch is to make a copy of the code and not worry about ruining the master by accidentally putting unrunnable code.

But isn't their local master really just like a branch itself? As they are making edits, they aren't changing the master on github, so others are free to pull working code from github. Then they merge, similar to a branch.

I'm confused, why should we branch if what they are doing seems to be working?

Thanks!

3 Answers
Related