0

Being new to Git, how to handle the following scenario:

I'm working on a bug fix and I want to do that in a separate branch. I have a remote Git repo and I have cloned it. So when I do a git branch on my local file system, I can see that I'm pointing to the master. I then created a new branch using:

git checkout -b myBranchName

Is this newly created branch available in the remote repo?
Should I push it explicitly?
What is the best workflow for this?

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
joesan
  • 13,963
  • 27
  • 95
  • 232

1 Answers1

2

Is this newly created branch available in the remote repo?

Nope, the branch is a "private" branch which means that its a local branch until you push it to remote.

Should I push it explicitly?

yes.

What is the best workflow for this?

Im recommending on using gitflow.

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
  • 1
    [GitHub Flow](https://guides.github.com/introduction/flow/index.html) is also a very good choice for lightweight projects or just projects with a different release model than that expected by Gitflow. – Sam Estep Jun 26 '15 at 11:27