Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Using Git

For short and to-the-point Git tutorials see here:

 

... to be continued

Git And Stash

Repositories

The repositories are hosted on DESY Stash.

RepositoryPurposeAccess
scetlib

main development

(master, develop, core, module branches)

clone/pull: all developers

browse/comment: all developers

push: module developers only

scetlib-datastores module data
publicpublic releases (stable branch)clone/pull/browse: public
private modules

private modules/extensions

read/write: module developers only

Access methods

There are different methods for accessing the Stash repositories summarized here:

MethodHow to accessOperations
git sshssh://git@stash.desy.de:7999/scetlib/scetlib.gitclone, pull, push
git httphttps://username@stash.desy.de/scm/scetlib/scetlib.gitclone, pull, push
web interfacehttps://stash.desy.de/projects/SCETLIB/repos/scetlib/browsebrowse, comment, pull request

There are three ways to authenticate with Stash:

  • authenticated access requires a DESY Stash account and allows all three methods above
  • unauthenticated access is possible for ssh access only
  • anonymous access allows http and web access to public repositories

Here is a summary of allowed operations for the different levels of authentication:

Operationauthenticatedunauthenticatedanonymous
clone, pull, browse public(tick) (tick)
clone, pull(tick) (ssh/http)(tick) (ssh)(error)
browse, comment(tick) (web)(error)(error)
push to unrestricted branch(tick) / (error)(error) ( (tick) via ssh)(error)
push to write-restricted branch(tick) / (error)(error)(error)

Here (tick) / (error) means that access can be configured for specific users if needed.

Configuring ssh access

ssh is the recommended way for command-line access, since it uses ssh keys and no passwords are required.

To configure authenticated ssh access, go to your Stash profile and install your public ssh key. When accessing the git repos via ssh using a so-installed ssh key, the Stash server automatically authenticates and associate the access with your Stash account.

For unauthenticated ssh access, your public ssh key can be installed directly in the repo (you have to email it to Frank). The advantage is that this works without requiring a Stash account, but it has some limitations as shown in the table above.

Note

Some networks block port 7999. In this case http is the only fall-back option.

Git Workflow

We use a standard Git workflow, where all feature development happens in branches. By default each module has its own branch with possible sub-branches for feature development. The integration happens through the develop branch. Here is a summary of the conventions for branches and their relations

BranchPurposeOriginates fromMerges into
masterStable releases stable
stablePublic access for stable releases, contains abridged (squashed) version of master
hotfix-xxxCritical fixes to stable releasesmasterdevelop and master
developIntegration of all features that will go into next releasemaster 
release-x.yPreparation for stable releasedevelopdevelop and master
coreDevelopment of core librarydevelopdevelop
module-xxxMain development for module 'xxx'developdevelop
module-xxx-featureDevelopment of 'feature' in module 'xxx'module-xxxmodule-xxx

 

 

 

 

Page Contents

 

Subpages

 

Create new subpage

 

  • No labels