Jump to content

Infrastructure/Git/Simple Workflow: Difference between revisions

From KDE Community Wiki
Odysseus (talk | contribs)
No edit summary
Skierpage (talk | contribs)
nuke this old 2016 page that shows up high in web searches
Tag: Replaced
 
(28 intermediate revisions by 6 users not shown)
Line 1: Line 1:
DANGER WILL ROBINSON!!!  THIS IS AN INCOMPLETE DRAFT!!!
{{Out of date|This page that shows up high in search results in 2025 was last updated in 2016 and marked "THIS IS AN INCOMPLETE DRAFT!!!". Instead read '''[[Infrastructure/GitLab]]'''.}}


= Simple Workflow =
:''View history if you want to see what it said, but don't bother discussing it.''
 
This workflow is designed to be as close as possible to the KDE SVN Workflow.  It is only recommended to be used for the first week or two of using Git with KDE while you become familiar with the basic Git commands.  Once comfortable with the basic commands you should then move on to the [[Infrastructure/Git/Feature_Branch_Workflow|Feature Branch Workflow]].
 
In particular this workflow will not use git branches or any remote features, all feature work will be in the local master (the Git name for trunk).
 
The worked examples given will be for an imaginary app called KFoo in a git.kde.org code repository called 'kfoo'.
 
More detailed information can be found on the main [[Infrastructure/Git|KDE Git page]].
 
== Set-up ==
 
This section documents how to set up Git and your code repository for development.
 
=== Configure Git ===
 
Follow all the instructions on the [[Infrastructure/Git/Configuration|KDE Git Configuration]] page, the instructions given below assume you are using the standard configuration.
 
=== Clone your repository ===
 
You need to copy your central code repository from git.kde.org into your local KDE source directory.  In Git this process is called cloning.
 
To clone your project repository:
 
cd your/source/dir
git clone kde:<project>
 
In our KFoo example:
 
git clone kde:kfoo
 
See the [[Getting_Started/Build/Environment#Source_Path|KDE Build Environment]] page for advice on structuring your source directory.
 
If you have a slow or intermittent internet connection then you may prefer to [[Getting_Started/Sources/Snapshots|download a snapshot tarball]] to bootstrap your clone.  You can copy the required command from the projects.kde.org Repository page for your project, but it will be of the form:
 
wget -c http://anongit.kde.org/<project>/<project>-latest.tar.gz
 
== Basic Actions ==
 
This section documents basic actions that are performed within your workflow.
 
See also the [[Infrastructure/Git/Recipes|KDE Git Recipes]] page.
 
=== Making changes ===
 
Changing code is no different from when using subversion.
 
=== Seeing What You Changed ===
 
 
 
=== Committing Your Changes ===
 
=== Merging Your Changes ===
 
== Local Feature Development ==
 
== Local Bug Fixing ==
 
If your bug fix is only for unstable master then no special actions are required, just follow the same steps as the feature development workflow above.
 
If your bug fix is for a stable branch then this cannot be done without using git branches.  The steps required will be given below but not explained in any depth.  If possible it is recommended you wait until you are familiar with using the [[Infrastructure/Feature_Branch_Workflow|Feature Branch Workflow]].
 
The steps detailed below are very inefficient as they use the same build tree and environment for unstable and stable.  A more efficient method is detailed in the [[Infrastructure/Feature_Branch_Workflow|Feature Branch Workflow]].
 
To make bug fixes on the 2.0 release you could simply checkout a local copy of the origin/release/2.0 branch and make you bug fixes there:
 
git branch --track stable4.6 origin/KDE/4.6
git checkout stable4.6
<make changes, build, test>
git commit -a
<make note of sha5 of commit>
git pull --rebase
git push origin stable4.6:KDE/4.6
git checkout master
git cherry-pick -x -e <sha5 of stable commit>
<build, test>
git pull --rebase
git push origin master:master

Latest revision as of 02:05, 21 February 2025

 
This article or section is out of date.
Reason: This page that shows up high in search results in 2025 was last updated in 2016 and marked "THIS IS AN INCOMPLETE DRAFT!!!". Instead read Infrastructure/GitLab. (Discuss in Talk:Infrastructure/Git/Simple Workflow)
View history if you want to see what it said, but don't bother discussing it.