Blitz Posted August 27, 2013 Report Share Posted August 27, 2013 (edited) Sāku bakstīt GIT, bet kautkā nesanāk (trūkst izpratnes). Tātad ir doma ka stāv kautkāds projekts X (testam 1 fails) mapē D:/wwwroot/repo_remote/file.php Pirmais pēc manuāļa ko daru konsolee ir, $ cd D:/wwwroot/repo_remote $ ls file.php $ git init Pēc tam cik saprotu, man ir jānoklonē šī repo lai varu darboties lokāli. $ cd D: $ mkdir local $ cd local $ git clone D:/wwwroot/repo_remote Cloning into 'repo_remote'... warning: You appear to have cloned an empty repository. done. Rezultātā tas fails file.php nenokopējas. Kā lai ievācu visu kas ir D:/wwwroot/repo_remote savā lokālajā repo un varu sākt strādāt? Edited August 27, 2013 by Blitz Quote Link to comment Share on other sites More sharing options...
jurchiks Posted August 27, 2013 Report Share Posted August 27, 2013 http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository Quote Link to comment Share on other sites More sharing options...
Blitz Posted August 27, 2013 Author Report Share Posted August 27, 2013 (edited) That creates a directory named grit, initializes a .git directory inside it, pulls down all the data for that repository, and checks out a working copy of the latest version. If you go into the new grit directory, you’ll see the project files in there, ready to be worked on or used. If you want to clone the repository into a directory named something other than grit, you can specify that as the next command-line option: Nevienu failu tur neredzu. Edited August 27, 2013 by Blitz Quote Link to comment Share on other sites More sharing options...
jurchiks Posted August 27, 2013 Report Share Posted August 27, 2013 Kādas problēmas? Quote Link to comment Share on other sites More sharing options...
Blitz Posted August 27, 2013 Author Report Share Posted August 27, 2013 augstāk minēts Quote Link to comment Share on other sites More sharing options...
codez Posted August 27, 2013 Report Share Posted August 27, 2013 Tu neko neno-commit-oji, tāpēc arī tukšs. Bet, lai strādātu lokāli, tev nav nekas jāklonē. uztaisi attiecīgajā mapē init un git repositorijs gatavs. Quote Link to comment Share on other sites More sharing options...
Blitz Posted August 27, 2013 Author Report Share Posted August 27, 2013 (edited) Nu tas lokāli vairāk testam, jo reposotorijs dzīmē atradīsies kautkru citur, gribu pēc standarta dabūt failus, padarboties un commitot uz servera. Respektīvi eksistējošam projektam pieslegt versiju kontroli. + laikam sapratu, tādām vajadzībām bez github neiztikt Edited August 27, 2013 by Blitz Quote Link to comment Share on other sites More sharing options...
pcsssss Posted August 27, 2013 Report Share Posted August 27, 2013 Jeb bitbucket - kas privātus repo ļauj veidot bez maksas. Quote Link to comment Share on other sites More sharing options...
Blitz Posted August 27, 2013 Author Report Share Posted August 27, 2013 (edited) Kā vispār praksē tiek darīts ja kods stāv iekš github vai bitbucket? Pašlaik izskatās ka viss GIT ieviešanas un izstrades proces ir šāds: 1) Uztaisam savu lokalo webserveri uz savas dev kastes ar tādu konfigu kā production serveris. 2) Nokopejam no production servera failus uz dev kastes kur stradasim ar GIT 3) Izveidojam repo iekš github 4) uztaisam push visus projekta failus uz Github 5) uztaisam pull lai savaktu jaunako no github 6) labojam, testejam, commitojam lokali 7) atkartojam 4 soli Kad ir gatavs tad vienkrshi downloado visus failus no github un kopē uz production servera? Edited August 27, 2013 by Blitz Quote Link to comment Share on other sites More sharing options...
jurchiks Posted August 27, 2013 Report Share Posted August 27, 2013 (edited) Ko? Muļķības, tev nekādu lokālo webserveri nevajag priekš GIT. Uztaisi githubā repositoriju, lokāli to checkouto un sāc strādāt. 1) make github/assembla/bitbucket/whatever repository 2) git checkout your repository locally 3) make your changes 4) sync your changes with incoming (git pull, bet te jāņem vērā local un remote branchi) 5) commit/push your changes rinse and repeat Edited August 27, 2013 by jurchiks Quote Link to comment Share on other sites More sharing options...
rpr Posted August 27, 2013 Report Share Posted August 27, 2013 ko nozīmē "rinse and repeat"? izskalo smadzenes un sāc no sākuma? jurchiks ar savu angļu valodu nebeidz pārsteigt. Quote Link to comment Share on other sites More sharing options...
jurchiks Posted August 27, 2013 Report Share Posted August 27, 2013 http://lmgtfy.com/?q=rinse+and+repeat Quote Link to comment Share on other sites More sharing options...
rATRIJS Posted August 27, 2013 Report Share Posted August 27, 2013 Tavā gadījumā Blitz ( kad ir jau esošs projekts bez VCS ): * tev ir tavs lokālais development environment * tev ir git centrālais serveris ( github, bitbucket, ... ) * tev ir centrālais repository uz tā servera * novelc no production visus projekta failus uz savu lokālo development environment ( teorētiski var jau palikt uz production, bet nu labāk nē ) * git init; git commit; git add remote; git push; - aizsūti projektu uz centrālo repository * uz production arī uzliec git un git pull no centrālā repository * tālāk jau veic izmaiņas, git commit, git push * uz production git pull lai iegūtu izmaiņas Ļoti vienkāršoti kaut kā tā, bet iesaku palasīt vairāk par git un tā workflow-iem un izvēlies sev piemērotāko: https://www.atlassian.com/git/workflows ( vispirms gan pamācies pašu git ) Quote Link to comment Share on other sites More sharing options...
Blitz Posted August 27, 2013 Author Report Share Posted August 27, 2013 (edited) Paldies, skaidrs, viss izskatas vienkarshi nemot verā ka VCS vispar nav nekad aiztikts. Ko? Muļķības, tev nekādu lokālo webserveri nevajag priekš GIT. Nu tas vairāk kā dev vide, kur patestēt kodu pirms push Edited August 27, 2013 by Blitz Quote Link to comment Share on other sites More sharing options...
daGrevis Posted August 27, 2013 Report Share Posted August 27, 2013 http://dagrevis.lv/blog/123/versiju-kontrole-un-git-101/ http://dagrevis.lv/blog/107/git-repo-uz-sava-servera/ Rinse and repeat. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.