How do you setup a GitHub repo and branch for collaboration?

Viewed 445

I've been looking this up on Google but haven't found a complete straightforward answer.

So far, this is what I know.

To set up a new repo, you can

Click + on the nav bar in GitHub and follow the instructions.

(No problems there)

To add collaborators, you can

Go to your repo on GitHub -> settings -> collaborators -> search by username

(No problems there)

To add branch for collaborator to use

git branch <branch-name>

(So I created a branch and I can push to it, but it doesn't show up on my collaborator's command line when he does 'git branch' after cloning.)

For collaborator to setup repo on their computer

You clone the directory on your local computer

git clone <url> <customize name>

(That's it right? I get errors with -set--upstream-to when I try to push and I'm not sure what that means and what to do.)

I'm just trying to find a simple step-by-step guide to do all these but there doesn't seem to be one that works.

2 Answers
Related