I have a repository on github with a main branch (master) and a branch for some experimental work. I made some commits and pushed to the experimental branch and everything
git clone git@github.com:abc/def.git cd def
Now create a tracking branch:
git branch --track experimental origin/experimental git checkout experimental
Then, after working there, simply push to github by
git push