git - How do I simply branch/copy master and upload this branch to GitHub? -


i must missing obvious, i'm struggling this.

i want copy 'master' repo on local computer , create own branch 'copy-of-master' , upload github (with no changes).

i want able see on github new 'copy-of-master' branch same master, nobody else use can upload changes without touching master.

somebody else take care of later merging 'master'.

to add confusion have used combination of phpstorm , git on command line.

here's have done, , why can't understand phpstorm doing:

  1. git checkout master
  2. added new branch in phpstorm (from master i'm guessing). did show current branch master in bottom right corner.
  3. 'git status' shows i'm in 'copy-of-master' branch.

now, surely 'push' repo , there should branch.

the problem i've tried in phpstorm , comes this:

no tracked branch. use checkbox below push branch manually specify, showing 5 recent commits

it shows 5 random commits have been done on variety of times.

also, @ bottom shows option "push current branch alternative branch" alternative branch branch i'm on anyway (??).

i've used phpstorm push before , ended automatically merging work main branch. don't want mess time.

nobody else working on repo @ all.

i've never used phpstorm before, assuming can detect git changes make command line (like creating new local , remote branches), can of things want exclusively using git command line:

git checkout -b copy-of-master git push -u origin head 

this create local branch copy-of-master based off of master, , set automatically track remote version origin/copy-of-master.

documentation


Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -