Project

General

Profile

Enstore Git Flow Tutorial 2


$ pwd
/opt/en.tmp




Checkout enstore code

$ git clone -o enstore ssh://p-enstore@cdcvs.fnal.gov/cvs/projects/enstore gitflow-test-5
Cloning into 'gitflow-test-5'...
remote: Counting objects: 86646, done.
remote: Compressing objects: 100% (25878/25878), done.
remote: Total 86646 (delta 60568), reused 86645 (delta 60568)
Receiving objects: 100% (86646/86646), 63.47 MiB | 11.04 MiB/s, done.
Resolving deltas: 100% (60568/60568), done.
Checking connectivity... done
Checking out files: 100% (2770/2770), done.

$ cd gitflow-test-5
[enstore@k gitflow-test-5]$ git branch -av
* develop                    feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'
  remotes/enstore/HEAD       -> enstore/develop
  remotes/enstore/develop    feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'
  remotes/enstore/production feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'

$ cd gitflow-test-5


Remote repository is set to "enstore" as we set it with "git clone -o enstore" option.
We fetched remote branch enstore/develop and checked it out to local branch develop :

$ git remote -v
enstore    ssh://p-enstore@cdcvs.fnal.gov/cvs/projects/enstore (fetch)
enstore    ssh://p-enstore@cdcvs.fnal.gov/cvs/projects/enstore (push)

$ git branch -av
* develop                    feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'
  remotes/enstore/HEAD       -> enstore/develop
  remotes/enstore/develop    feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'
  remotes/enstore/production feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'


Note, git "subtree" subtrees like DButils, ftt are present in checkout:
$ ls -l
total 284
drwxrwxr-x  3 enstore enstore   4096 Sep 30 16:24 bin
drwxrwxr-x  2 enstore enstore   4096 Sep 30 16:24 crontabs
drwxrwxr-x  6 enstore enstore   4096 Sep 30 16:24 databases
drwxrwxr-x  5 enstore enstore   4096 Sep 30 16:24 DBUtils
drwxrwxr-x  3 enstore enstore   4096 Sep 30 16:24 dcache-deploy
drwxrwxr-x  7 enstore enstore   4096 Sep 30 16:24 doc
drwxrwxr-x  4 enstore enstore  12288 Sep 30 16:24 etc
drwxrwxr-x  2 enstore enstore   4096 Sep 30 16:24 external_distr
drwxrwxr-x 10 enstore enstore   4096 Sep 30 16:24 ftt
drwxrwxr-x  2 enstore enstore   4096 Sep 30 16:24 gadfly
drwxrwxr-x  2 enstore enstore   4096 Sep 30 16:24 helpDesk
drwxrwxr-x  5 enstore enstore   4096 Sep 30 16:24 HTMLgen
drwxrwxr-x  5 enstore enstore   4096 Sep 30 16:24 ingest
-rw-rw-r--  1 enstore enstore    477 Sep 30 16:24 Makefile
drwxrwxr-x  3 enstore enstore   4096 Sep 30 16:24 modules
drwxrwxr-x  3 enstore enstore   4096 Sep 30 16:24 ngop
drwxrwxr-x 11 enstore enstore   4096 Sep 30 16:24 psycopg2
drwxrwxr-x  4 enstore enstore   4096 Sep 30 16:24 PyGreSQL
-rw-rw-r--  1 enstore enstore   6810 Sep 30 16:24 README
drwxrwxr-x  2 enstore enstore   4096 Sep 30 16:24 release-notes
-rw-rw-r--  1 enstore enstore 122949 Sep 30 16:24 Release_Notes
-rw-rw-r--  1 enstore enstore     62 Sep 30 16:24 rpm_version
drwxrwxr-x  2 enstore enstore  12288 Sep 30 16:24 sbin
drwxrwxr-x  3 enstore enstore   4096 Sep 30 16:24 site_specific
drwxrwxr-x  2 enstore enstore   4096 Sep 30 16:24 spec
drwxrwxr-x  3 enstore enstore  16384 Sep 30 16:24 src
drwxrwxr-x  5 enstore enstore   4096 Sep 30 16:24 test
drwxrwxr-x  4 enstore enstore   4096 Sep 30 16:24 tools
drwxrwxr-x  2 enstore enstore   4096 Sep 30 16:24 ups
drwxrwxr-x  3 enstore enstore   4096 Sep 30 16:24 volume_import
drwxrwxr-x  3 enstore enstore   4096 Sep 30 16:24 www
drwxrwxr-x  7 enstore enstore   4096 Sep 30 16:24 xml2ddl

branch "production" shall exist before git flow init. Create this branch with 'git branch develop' , or just checkout it:


$ git checkout production
Branch production set up to track remote branch production from enstore.
Switched to a new branch 'production'

$ git branch -av
  develop                    feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'
* production                 feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'
  remotes/enstore/HEAD       -> enstore/develop
  remotes/enstore/develop    feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'
  remotes/enstore/production feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'

$ git branch -av
  develop                    feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'
* production                 feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'
  remotes/enstore/HEAD       -> enstore/develop
  remotes/enstore/develop    feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'
  remotes/enstore/production feaf1e5 Add 'xml2ddl/' from commit 'fc42132f6885497608ab6926daa4df53c1c4eb49'


Set "production" branch to "bringing forth production releases". Check and agree with other defaults.
Set tag prefix as below.

$ git flow init

Which branch should be used for bringing forth production releases?
   - develop
   - production
Branch name for production releases: [production] 

Which branch should be used for integration of the "next release"?
   - develop
Branch name for "next release" development: [develop] 

How to name your supporting branch prefixes?
Feature branches? [feature/] 
Release branches? [release/] 
Hotfix branches? [hotfix/] 
Support branches? [support/] 
Version tag prefix? [] v_