[plt-dev] Q. about local branches

From: Michael Sperber (sperber at deinprogramm.de)
Date: Fri Apr 23 09:01:51 EDT 2010

Noel Welsh <noelwelsh at gmail.com> writes:

> git checkout -b branch-name
> git push origin branch-name --set-upstream
>
> First command creates a new branch. The second command sends the
> branch to the server called origin and tells the local repository to
> follow changes on the server's branch. Now any changes made on your
> local branch branch-name can be pushed to the server and git pull will
> get any changes from the server.

Are there conventions for this?  I see this:

kramer[8] git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
  remotes/origin/ryanc/sp-parser-tools
  remotes/origin/samth/match-for
  remotes/origin/samth/match-syntax-parse
  remotes/origin/samth/new-logic2
  remotes/origin/samth/preserve-letrec
  remotes/origin/samth/ts-new-logic
  remotes/origin/samth/ts-new-logic-fixed
  remotes/origin/samth/typed-check-syntax
  remotes/origin/samth/unit-hacking
  remotes/origin/sstrickl/cc-init-phase2
  remotes/origin/sstrickl/contract-paths
  remotes/origin/sstrickl/mred-contracts
  remotes/origin/sstrickl/unit-ctc-fix

I'm afraid to play with this, since I don't exactly how these names are
constructed.  I'm guessing:

git checkout -b <whatever-branch-name-I-please>
git push origin sperber/<a-branch-name-like-"mred-contracts"-above> --set-upstream

Correct?  

Or do 

<whatever-branch-name-I-please> and
<a-branch-name-like-"mred-contracts"-above> 

need to be equal?  

Or do
<whatever-branch-name-I-please> and
sperber/<a-branch-name-like-"mred-contracts"-above> 

need to be equal?  Or do I need to sprinkle in a "remotes" or
"remotes/origin" prefix somewhere there?

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla


Posted on the dev mailing list.