3

Here's generally speaking (I can provide more details), our workflow:

1) We have a prime repo on a remote server host.

2) We have a bare repo on a remote server host.

3) We have a clone of the bare repo with a working tree on our local computers, and the bare is setup as a remote on our local repos.

Under this, we are working with two branches at least: dev branch, and a master branch.

A hook will administrate this process to either make changes on dev or master according to the HEAD placement.

So, this is a nice worflow, but I'm wondering if someone could help us making this even better.

Let's say user A is working on his local branch test-this-thing;

He/She wishes another developer to work on this branch as well.

By taking into consideration the workflow above, is there a way to push a specific branch so that other users can pull that work from that specific branch as well, so that they can work on test-this-thing together ?

Update

hub is or origin renamed. So:

If I do locally:

git checkout -b test
git push hub test

I get the branch on the bare repo. OK.

If the other developer B does:

git checkout -b testdeveloperB
git pull hub test:testdeveloperB

It will successfully fetch and merge the test branch into testdeveloperB.

So, let's say developer B makes a change on is local testdeveloperB branch and wishes to push those changes into hub test branch.

He IS on branch testdeveloperB

I tried:

git push hub test:testdeveloperB - it says there's no such think as test.

I tried:

git push hub testdeveloperB:test - and it was apparently OK.

So regarding this push - the first parameter after hub, is the place where we have our files references to be pushed, and the second is where we wish to files references to go.

Since we are on our local testdeveloperB branch, why to we need to explicitly referring it ?

Why can't we simple do git push ?

update with answer BECAUSE we haven't setup that on our git config, so git doesn't know what to do with that.

Thanks in advance.

MEM
  • 30,529
  • 42
  • 121
  • 191
  • Here is the answer: http://stackoverflow.com/questions/8496358/how-to-share-a-git-feature-or-topic-branch-with-multiple-developers – Hidden Apr 24 '13 at 09:44
  • What's the purpose of the prime repo? – 1615903 Apr 24 '13 at 09:47
  • @user1615903: I don't understand your question. – MEM Apr 24 '13 at 10:15
  • Well, answer to your question in it's current form is: `git push origin test-this-thing` (assuming your bare remote repo is named origin), but I assumed this was not really what you were after, and in your question, you said: _1) We have a prime repo on a remote server host._ - I was wondering what's the purpose of that repo, and is it somehow relevant to this question. – 1615903 Apr 24 '13 at 10:18
  • @user1615903 On that prime repo, we keep a working tree of the production files. We have pushed the master branch of prime, into the bare repo, so that all prime master file references could be on hub as well. – MEM Apr 24 '13 at 10:29

0 Answers0