KDevelop5/Manual/Working with version control systems/da: Difference between revisions
(Importing a new version from external source) |
(Importing a new version from external source) |
||
Line 5: | Line 5: | ||
Hvis du arbejder med store projekter, så bliver kildekoden sandsynligvis håndteret af et versionskontrolsystem så som [http://subversion.apache.org subversion] eller [http://git-scm.com/ git]. Det følgende er skrevet med '''subversion''' i tankerne, men vil være lige så sandt, hvis du bruger '''git''' eller et andet understøttet versionskontrolsystem. | Hvis du arbejder med store projekter, så bliver kildekoden sandsynligvis håndteret af et versionskontrolsystem så som [http://subversion.apache.org subversion] eller [http://git-scm.com/ git]. Det følgende er skrevet med '''subversion''' i tankerne, men vil være lige så sandt, hvis du bruger '''git''' eller et andet understøttet versionskontrolsystem. | ||
Bemærk først, at hvis mappen, som projektet er placeret i er under versionskontrol, så vil '''KDevelop''' automatisk bemærke det. Med andre ord behøver du ikke at bede '''KDevelop''' om at tjekke en kopi ud, når du opsætter dit projekt. Det er i orden at dirigere '''KDevelop''' til en mappe, til hvilken du tidligere har tjekket en kopi fra et arkiv ud. Hvis du har en mappe under versionskontrol, så åbn værktøjsvisningen '''Projekter'''. Der er flere ting du kan gøre: | |||
* If your directory has become outdated, you can update it from the repository: Click on the project name with the right mouse button, go to the menu <menuchoice>Subversion</menuchoice> and select <menuchoice>Update</menuchoice>. This will bring all files that belong to this project up to date with respect to the repository. | * If your directory has become outdated, you can update it from the repository: Click on the project name with the right mouse button, go to the menu <menuchoice>Subversion</menuchoice> and select <menuchoice>Update</menuchoice>. This will bring all files that belong to this project up to date with respect to the repository. |
Revision as of 08:21, 1 October 2017
Arbejdet med versionskontrolsystemer
Hvis du arbejder med store projekter, så bliver kildekoden sandsynligvis håndteret af et versionskontrolsystem så som subversion eller git. Det følgende er skrevet med subversion i tankerne, men vil være lige så sandt, hvis du bruger git eller et andet understøttet versionskontrolsystem.
Bemærk først, at hvis mappen, som projektet er placeret i er under versionskontrol, så vil KDevelop automatisk bemærke det. Med andre ord behøver du ikke at bede KDevelop om at tjekke en kopi ud, når du opsætter dit projekt. Det er i orden at dirigere KDevelop til en mappe, til hvilken du tidligere har tjekket en kopi fra et arkiv ud. Hvis du har en mappe under versionskontrol, så åbn værktøjsvisningen Projekter. Der er flere ting du kan gøre:
- If your directory has become outdated, you can update it from the repository: Click on the project name with the right mouse button, go to the menu and select . This will bring all files that belong to this project up to date with respect to the repository.
- If you want to restrict this action to individual subdirectories or files, then expand the tree view of this project to the level you want and right click on a subdirectory or file name, then do the same as above.
- If you've edited one or more files, expand the view of this project to the directory in which these files are located and right click on the directory. This gives you a menu item that offers you different choices. Choose to see the differences between the version you have edited and the version in the repository you had previously checked out (the revision "base"). The resulting view will show the "diffs" for all files in this directory.
- If you only edited a single file, you can also get the menu for this file by simply right clicking on the corresponding file name in the project view. Even simpler, just right clicking into the Editor view in which you have opened this file will also give you this menu option.
- If you want to check in one or more edited files, right click either on an individual file, subdirectory, or whole project and select
step-32.cc
andstep-32.prm
because the changes in these files have nothing to do with the other ones I made to this project and I don't yet want to check them in yet (I may later want to do so in a separate commit). After reviewing the changes you can enter a commit message into the text box and hit on the right to send things off. . This will get you into mode, the third mode besides and as you can see in the top right corner of the KDevelop main window. The picture on the right shows you how this looks. In mode, the top part shows you diffs for the entire subdirectory/project and each individual changed file with changes highlighted (see the various tabs on this part of the window). By default, all changed files are in the changeset you are about to commit, but you can unselect some of the files if their modifications are unrelated to what you want to commit. For example, in the example on the right I have unselected
- As with seeing differences, if you want to check in a single file you can also just right click into the editor window to get the menu item.