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.