re: Break Git Down: How To Create a Branch From Master and Make Your First Commit! VIEW POST

FULL DISCUSSION
 

Try this: git checkout origin/master -b newer-branch

This will do the following:

  1. Create the newer-branch
  2. Set the up stream branch to origin/master
  3. Set your current branch to newer-branch

Use "git branch -vv" to see the difference between "git checkout -b newer-branch" and "git checkout origin/master -b newer-branch-2"

code of conduct - report abuse