Re: [Koha-devel] [Koha] [KOHA] Koha GIT - Cloned the main repository but stuck on how to proceed
2010/8/2 Susan Mustafa <susan.mustafa@gmail.com>:
Dear Chris, and all Koha,
This might not be best place to ask, but I am new to GIT and I have searched all day on a way to do the following.
[Development] [Test] [Production] <--Big Servers, not laptop
[Development Server to have] ============[Koha GIT Clone] ====> sudo git clone git://git.koha-community.org/koha.git koha-clone ========================[Company Branch] =====>sudo git branch --track MSDR-Branch origin/master [Test Server to have] ==================Only Test Code [no git] [Production Server to have] ==================Only Production Code [no git]
I am unclear as to why you ran the commands as sudo, you will now have a git repository owned as root What I would have done is git clone git://git.koha-community.org/koha.git koha-clone git checkout -b MSDR-Branch --track origin/master
Now I believe up to this point I understand and it is working fine. However I am stuck on the following:
[My Laptop - Local Development]
- How do I checkout the MSDR-Branch on this laptop, so I can make changes to it, and commit those changes to the MSDR-Branch. [Help please]. I did alot of different commands, non of which work.
The above commands would have made a new branch that tracks origin/master (do you really want to track master which is what will become 3.2 or the 3.0.x branch where the 3.0.x releases come from?)
Assuming the laptop has SSH installed, and the IP is 123.xx.xxx.xxx
I searched google for remote branches/checking out remote branches/....and I don't know how to proceed. It all seems complicated? Do I use checkout command, and how do I access the MSDR-Branch from the server while working from laptop.
If you want to work on the repository on your laptop, you simply clone it so on your laptop git clone ssh://username@servername.or.ip/path/to/kohaclone kohaclone Now you have the repository cloned to your laptop git checkout -b MSDR-Branch --track origin/MSDR-Branch And a branch that tracks it. NOTE: If this fails due to permissions it is probably because you created your repository on your server as root. You should fix the permissions You can then do your work edit a file git commit file if you want that change on your server git push Occasionally you will want to do a git pull to get the latest changes from other members of your team also. Of course when working on GPLed code as Koha is, you have the option of hosting your repository somewhere like gitorious or github. That way others can benefit from the work you do and work isn't duplicated, and you are giving back to the project. Chris
participants (1)
-
Chris Cormack