Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Linux Tools Project/Git"

(Initial revision)
 
(Add a few notes regarding feature branch naming)
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
First steps
+
{{#eclipseproject:technology.linux-distros}}
* Read about [http://wiki.eclipse.org/Git git at Eclipse]
+
{{Linux_Tools}}
 +
 
 +
= Git for Linux Tools =
 +
In late February 2011, we moved from SVN to Git.  Our SVN repositories were joined into one Git repository (and one for eclipse-build).
 +
 
 +
== Repository ==
 +
* [http://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.git/ http://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.git/] web
 +
* git://git.eclipse.org/gitroot/linuxtools/org.eclipse.linuxtools.git (anonymous)
 +
* http://git.eclipse.org/gitroot/linuxtools/org.eclipse.linuxtools.git (anonymous)
 +
* ssh://<committerId>@git.eclipse.org/gitroot/linuxtools/org.eclipse.linuxtools.git (committers)
 +
 
 +
== First steps ==
 +
* Learn about Git:  [http://git-scm.com/ Git], [http://progit.org/book/ Pro Git], [http://tom.preston-werner.com/2009/05/19/the-git-parable.html The Git Parable], [http://library.edgecase.com/git_immersion/index.html Git Immersion]
 +
* Read about [http://wiki.eclipse.org/Git Git at Eclipse]
 
* Note the [http://wiki.eclipse.org/images/7/78/Git-correct.png process] by which things must be committed at eclipse.org
 
* Note the [http://wiki.eclipse.org/images/7/78/Git-correct.png process] by which things must be committed at eclipse.org
  
Commit messages
+
== Commit messages ==
* See guidelines others have written such as [http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html this one]
+
From [http://webcache.googleusercontent.com/search?q=cache:8wrp2sM4vcQJ:tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html+git+commit+messages&cd=2&hl=en&ct=clnk&gl=ca&client=firefox-a&source=www.google.ca this guide] which is no longer accessible as of 2011-08-19:
 +
 
 +
* make the first line a concise summary of the changes introduced by the commit, <= 50 characters in length
 +
* if there are any technical details that cannot fit in the summary, put them in the body instead.
 +
* wrap lines in the body to <= 72 characters
 +
* write entries in the present tense (just like with ChangeLog entries):  "Fix bug #111", not <s>"Fixed bug #111"</s>
 +
 
 +
Taken directly from http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html, the format of an ideal commit message:
 +
 
 +
<pre>
 +
Capitalized, short (50 chars or less) summary
 +
 
 +
More detailed explanatory text, if necessary.  Wrap it to about 72
 +
characters or so.  In some contexts, the first line is treated as the
 +
subject of an email and the rest of the text as the body.  The blank
 +
line separating the summary from the body is critical (unless you omit
 +
the body entirely); tools like rebase can get confused if you run the
 +
two together.
 +
 
 +
Write your commit message in the present tense: "Fix bug" and not "Fixed
 +
bug."  This convention matches up with commit messages generated by
 +
commands like git merge and git revert.
 +
 
 +
Further paragraphs come after blank lines.
 +
 
 +
- Bullet points are okay, too
 +
 
 +
- Typically a hyphen or asterisk is used for the bullet, preceded by a
 +
  single space, with blank lines in between, but conventions vary here
 +
 
 +
- Use a hanging indent
 +
</pre>
 +
 
 +
== Branches ==
 +
Please ensure that you fetch and rebase rather than merge.  When new branches are created, please use the "rebase" pull strategy.  This is documented in the EGit User Guide:  [[EGit/User_Guide#Branch_Creation_Dialog]] and is performed on the commandline like so:
 +
 
 +
<tt>git config branch.<branchname>.rebase true</tt>
  
Branches
 
* Branches created for bug fixes
 
** prefix the name with the bug # and a 'very' short description (ex. 307258-automake-tabs-to-spaces)
 
 
* Release branches
 
* Release branches
 
** stable-Major.Minor
 
** stable-Major.Minor
* Branches specific to a sub-project
 
** namespaced (ex. valgrind/remote, lttng/super-awesome-feature)
 
  
Tags
+
=== Topic Branches/Transient Branches ===
 +
 
 +
Sometimes it's desirable to share work of an experimental feature or a bug fix. Feel free to push your topic branches to the main repository. Consider adding the name of the original author of the branch to it's name so as to make it more apparent who should be contacted when there is a desire to collaborate. These branches may get deleted once the feature/bugfix is complete and merged with the main code line. In general, please follow the following simple naming rules for them:
 +
 
 +
* Feature branches specific to a sub-project.
 +
** namespaced (e.g. feature/valgrind/severin-charting, feature/lttng/super-awesome-feature)
 +
* Feature branches not specific to any sub-project
 +
** namespaced (e.g. feature/profiling-framework, feature/super-awesome-feature)
 +
* Branches created for bug fixes
 +
** namespaced and prefixed with the bug # and a 'very' short description (e.g. bugfix/307258-automake-tabs-to-spaces)
 +
 
 +
== Tags ==
 
* Tag each release with vMajor.Minor.Micro
 
* Tag each release with vMajor.Minor.Micro
 +
* See [http://semver.org/ Semantic Versioning] for more details
 +
 +
== More reading ==
 +
* [[MDT/OCL/Dev/EGit]] OCL project guide
 +
* [[Platform-releng/Git_Workflows]] Eclipse Platform Git Workflows

Revision as of 11:16, 14 December 2011

{{#eclipseproject:technology.linux-distros}}

Linux Tools
Website
Download
Community
Mailing ListForumsIRCmattermost
Issues
OpenHelp WantedBug Day
Contribute
Browse Source

Git for Linux Tools

In late February 2011, we moved from SVN to Git. Our SVN repositories were joined into one Git repository (and one for eclipse-build).

Repository

First steps

Commit messages

From this guide which is no longer accessible as of 2011-08-19:

  • make the first line a concise summary of the changes introduced by the commit, <= 50 characters in length
  • if there are any technical details that cannot fit in the summary, put them in the body instead.
  • wrap lines in the body to <= 72 characters
  • write entries in the present tense (just like with ChangeLog entries): "Fix bug #111", not "Fixed bug #111"

Taken directly from http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html, the format of an ideal commit message:

Capitalized, short (50 chars or less) summary

More detailed explanatory text, if necessary.  Wrap it to about 72
characters or so.  In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body.  The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.

Write your commit message in the present tense: "Fix bug" and not "Fixed
bug."  This convention matches up with commit messages generated by
commands like git merge and git revert.

Further paragraphs come after blank lines.

- Bullet points are okay, too

- Typically a hyphen or asterisk is used for the bullet, preceded by a
  single space, with blank lines in between, but conventions vary here

- Use a hanging indent

Branches

Please ensure that you fetch and rebase rather than merge. When new branches are created, please use the "rebase" pull strategy. This is documented in the EGit User Guide: EGit/User_Guide#Branch_Creation_Dialog and is performed on the commandline like so:

git config branch.<branchname>.rebase true

  • Release branches
    • stable-Major.Minor

Topic Branches/Transient Branches

Sometimes it's desirable to share work of an experimental feature or a bug fix. Feel free to push your topic branches to the main repository. Consider adding the name of the original author of the branch to it's name so as to make it more apparent who should be contacted when there is a desire to collaborate. These branches may get deleted once the feature/bugfix is complete and merged with the main code line. In general, please follow the following simple naming rules for them:

  • Feature branches specific to a sub-project.
    • namespaced (e.g. feature/valgrind/severin-charting, feature/lttng/super-awesome-feature)
  • Feature branches not specific to any sub-project
    • namespaced (e.g. feature/profiling-framework, feature/super-awesome-feature)
  • Branches created for bug fixes
    • namespaced and prefixed with the bug # and a 'very' short description (e.g. bugfix/307258-automake-tabs-to-spaces)

Tags

More reading

Back to the top