You are here: GSI Wiki>Epics Web>DevelopersCorner (revision 22)EditAttach
Epics@GSI Webhome

Developers' Corner

Tips & Tricks and Examples

multiple IOCs

To have one PC / Computer per IOC/Server seems to be an annoying situation.
Solution would be to be able to have several IOCs running on a PC. But you will be faced by the following Problems
(taken from talk of Kenneth Evans: "_Channel Access in Depth_", Kenneth Evans, Jr., March 8, 2005 as Part of the EPICS “Getting Started” Lecture Series, p15):

Multiple Servers on the Same Host
  • Used to not be possible at all (Base 3.13)
  • Now, it can be done, but there are problems
  • Will get message
    • cas warning: Configured TCP port was unavailable. Using dynamically assigned TCP port 45003, but now two or more servers share the same UDP port. Depending on your IP kernel this server may not be reachable with UDP unicast (a host's IP in EPICS_CA_ADDR_LIST)
  • First part means clients will establish their circuit on another port than the default 5064.
    • Not a problem
  • Second part means unicast search requests may not get to both servers
    • UDP deficiency, similar to the CaRepeater problem
    • May be a problem when EPICS_CA_ADDR_LIST is used

Solution 1: EPICS_CA_ADDR_LIST

EPICS_CA_ADDR_LIST
  • Determines where to search
  • Is a list (separated by spaces)
    • “123.45.1.255 123.45.2.14 123.45.2.108”
  • Default is broadcast addresses of all interfaces on the host
    • Works when servers are on same subnet as clients
  • Broadcast address
    • Goes to all servers on a subnet
    • Example: 123.45.1.255
    • Use ifconfig –a on UNIX to find it (or ask an administrator)

By setting the EPICS_CA_ADDR_LIST, the EPICS Channel Access (Client) Address List on the client site.
E.g. for MEDM:
  1. export EPICS_CA_ADDR_LIST and start medm in the same session
    $> export EPICS_CA_ADDR_LIST && medm &

Solution 2: make use of more EPICS environment variables to allow inter IOC communication

Following the thread in tech-talk Multiple IOC from 2007:
   It was fixed by setting the CAS Beacon Address List to the address and ports of the other IOC's CA repeater port.

   IOC1

   EPICS_CAS_BEACON_ADDR_LIST=nnn.nnn.nnn.nnn:5071
   EPICS_CA_ADDR_LIST=nnn.nnn.nnn.nnn:5070

   IOC2

   EPICS_CA_Server_Port=5070
   EPICS_CAS_Server_Port=5070
   EPICS_CA_Repeater_Port=5071
   EPICS_CAS_BEACON_ADDR_LIST=nnn.nnn.nnn.nnn:5065
   EPICS_CA_ADDR_LIST=nnn.nnn.nnn.nnn:5064

-- PeterZumbruch - 08 Apr 2010

cris-axis addition for several EPICS applications

HOWTO build flex (libfl) for cris-axis crisv32-axis

Since some of the EPICS extensions and modules rely on libfl flex and the standard distribution of AXIS SDK doesn't contain the libfl.a this has to be added:
Prerequisites
  • Axis SDK
  • cross compiler

Build & Installation

  1. set some helper variables:
    export SRC_DIR=<Source Directory>
    export DOWNLOAD_DIR=<Download Directory>
    # provided cross compiler and SDK are installed here export ETRAX_DIR=<ETRAX Tools Directory>
  2. download sources from http://sourceforge.net/projects/flex/ (version 2.5.35) via direct link to $DOWNLOAD_DIR
    mkdir -p ${DOWNLOAD_DIR:?undefined} &&
    wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download
  3. unpack to $SRC_DIR
    mkdir -p ${SRC_DIR:?undefined} &&
    cd SRC_DIR &&
    tar -jxvf flex-2.5.35.tar.bz
  4. Source cris-axis-setup.sh ,defining environment variables, e.g. AXIS_TOP_DIR, and extending PATH, needs ETRAX_DIR to be defined.
    cd ${SRC_DIR:?undefined} &&
    wget https://wiki.gsi.de/foswiki/pub/Epics/DevelopersCorner/cris-axis-setup.sh &&
    source cris-axis-setup.sh
    or just take its main code:
    oldpwd=$OLDPWD
    base=$(pwd)
    cd ${ETRAX_DIR:?undefined)/SDK && cd $(ls --color=never -t -1 -d devbo* | head -n 1) && . ./init_env
    cd $base
    cd ${ETRAX_DIR:?undefined)/ETRAX/compiler && . ./setup.sh
    cd $oldpwd
    cd $base
    unset scriptname base oldpwd epicsDir
  5. Change to source directory $SRC_DIR
    cd ${SRC_DIR:?undefined}
  6. Since configure automatically sets for cross-compilers 'ac_cv_func_malloc_0_nonnull' and 'ac_cv_func_realloc_0_nonnull' to 'no', (since it cannot check it) those have to be configured by hand:
    1. cris-axis
      1. export myTARGET=cris-axis-linux-gnu
      2. make clean
      3. ./configure --prefix=${AXIS_TOP_DIR:?undefined}/target/${myTARGET:?defined}/usr --host=${myTARGET} --build=i686-pc-linux-gnu ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes
      4. make
      5. make install
    2. crisv32-axis
      1. export myTARGET=crisv32-axis-linux-gnu
      2. make clean
      3. ./configure --prefix=${AXIS_TOP_DIR:?undefined}/target/${myTARGET:?defined}/usr --host=${myTARGET} --build=i686-pc-linux-gnu ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes
      4. make
      5. make install

    Compact
      export SRC_DIR=<Source Directory>
      export DOWNLOAD_DIR=<Download Directory>
      # provided cross compiler and SDK are installed here
      export ETRAX_DIR=<ETRAX Tools Directory>

      mkdir -p ${DOWNLOAD_DIR:?undefined} &&
      wget http://prdownloads.sourceforge.net/flex/flex-2.5.35.tar.bz2?download

      mkdir -p ${SRC_DIR:?undefined} &&
      cd SRC_DIR &&
      tar -jxvf flex-2.5.35.tar.bz

      oldpwd=$OLDPWD
      base=$(pwd)
      cd ${ETRAX_DIR:?undefined)/SDK && cd $(ls --color=never -t -1 -d devbo* | head -n 1) && . ./init_env
      cd $base
      cd ${ETRAX_DIR:?undefined)/ETRAX/compiler && . ./setup.sh
      cd $oldpwd
      cd $base
      unset scriptname base oldpwd epicsDir

      # crisv-axis
      export myTARGET=cris-axis-linux-gnu
      cd ${SRC_DIR:?undefined} &&
      make clean
      ./configure --prefix=${AXIS_TOP_DIR:?undefined}/target/${myTARGET:?defined}/usr --host=${myTARGET} --build=i686-pc-linux-gnu ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes &&
      make && make install

      # crisv32-axis
      export myTARGET=crisv32-axis-linux-gnu
      cd ${SRC_DIR:?undefined} &&
      make clean
      ./configure --prefix=${AXIS_TOP_DIR:?undefined}/target/${myTARGET:?defined}/usr --host=${myTARGET} --build=i686-pc-linux-gnu ac_cv_func_realloc_0_nonnull=yes ac_cv_func_malloc_0_nonnull=yes &&
      make && make install

-- PeterZumbruch - 09 Apr 2009

new IOC command

The general way how to add a new IOC command, which can be used inside the IOC Shell is described in Chapter 18.3 IOC Shell - IOC Shell Programming of the IOC Application Developer's Guide (3.14.9).

Here is an example (with the help of BK) to make the command dumpTable(mbo, dac, channel, type) available at the IOC shell.

  • application.c
      #include <epicsExport.h>
      
      /* ... */ 
      
      /***************************************************************************/
      static void dumpTable(int mbo, int dac, int channel, short type)
      {
              /* some function code */
              /* ... */ 
      }
      /***************************************************************************/
      
      /* Information needed by iocsh */
      /* Argument definition */
      static const iocshArg  dumpTableArg0 = {"mbo number",     iocshArgInt};
      static const iocshArg  dumpTableArg1 = {"dac number",     iocshArgInt};
      static const iocshArg  dumpTableArg2 = {"channel number", iocshArgInt};
      static const iocshArg  dumpTableArg3 = {"table type",     iocshArgInt};
      static const iocshArg  *dumpTableArgs[] = 
      {
              &dumpTableArg0,
              &dumpTableArg1,
              &dumpTableArg2,
              &dumpTableArg3
      };
      /* Function definition */
      static const iocshFuncDef dumpTableFuncDef = {"dumpTable", 4, dumpTableArgs};
      
      /* Wrapper called by iocsh, selects the argument types that dumpTable needs */
      static void dumpTableCallFunc(const iocshArgBuf *args) {
              dumpTable(args[0].ival, args[1].ival, args[2].ival, args[3].ival);
      }
      
      /* Registration routine, runs at startup */
      static void dumpTableRegister(void) {
              iocshRegister(&dumpTableFuncDef, dumpTableCallFunc);
      }
      epicsExportRegistrar(dumpTableRegister);

  • application.dbd
      variable(mySubDebug)
      ...
      registrar(dumpTableRegister)

-- PeterZumbruch - 08 May 2008

use of msi with multiple template files

To produce a single db file from multiple template files it is sufficient to include in the Makefile in the app/Db directory the line with the name of the db. This should be a not existing file (because it will be produced). Existing must be the corresponding substitutions file and the template file(s).

Be aware that none of the template files should have the same name as the substitutions file.

Example: To make a db called vulom_1.db use a file vulom_1.substitutions which references for instance vulom.template, vulomreg.template, and vulomreg1.template

vulom_1.substitutions:
    file vulom.template {
    { PRE=HAD, NN="0", MM="1"}
    }
    file vulomreg.template {
    { PRE=HAD, NN="0", MM="1", CC="Del_0", AA="0", LIM="49.5", GAIN="3.3", LLIM="0"}
    { PRE=HAD, NN="0", MM="1", CC="Del_1", AA="1", LIM="49.5", GAIN="3.3", LLIM="0"}
    }
    file vulomreg1.template {
    { PRE=HAD, NN="0", MM="1", CC="Down_0", AA="7", LIM="15", GAIN="1"}
    { PRE=HAD, NN="0", MM="1", CC="Down_1", AA="8", LIM="15", GAIN="1"}
    }
    

The Makefile should contain a line
    DB += vulom_1.db
    
-- BurkhardKolb - 09 May 2008

additional Dependencies

Adding the line in the Makefile
    vulom_1_DEPENDS ?= $(shell perl -n -e 'if (/file\s+(\w+.template)/) {print "$$1 \n";}' vulom_1.substitutions )
    
right after the previous
    DB += vulom_1.db
    
enables EPICS to check for dependencies (q.v. IOC Application Developer's Guide - 3.14.9 Chapter 4.6.4):
    If a <name> substitutions file contains "file" references to other input files, these referenced files should be made dependencies of the created <name>.db by adding a dependency definition line:
    <name>_DEPENDS = <filename1> <filename2> ...
-- PeterZumbruch - 09 May 2008

fixing aliases in CSS

When SDS files in CSS are automatically created using the ADL converter tool some of the macros (medm) / aliases (SDS) don't work.

In order to get them right place the alias in the primary PV and the Alias before referencing them as a label.
-- BurkhardKolb - 05 Jun 2009

Applications & Use Cases

The idea is to place here some (external) EPICS applications and use cases (or links to them).

Getting started using Stream Devices
A well documented introduction of the PANDA group at Bochum, Germany, of using StreamDevice accessing exemplarily an I-7565 USB/CAN Converter
http://panda-wiki.gsi.de/cgi-bin/view/DCS/EPICSstartUsingStreamDev
-- PeterZumbruch - 07 Apr 2010

Linux tricks & tips

serial device settings - switch off every possible hidden manipulation feature

TippsSerialDeviceSettingsToSwitchOffEveryHiddenManipulation (edit)

$> stty -F /dev/ttySx -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke 19200

    • Output settings:
      -opost
      do not post-process output
      -onlcr
      do not translate newline to carriage return-newline
    • Local settings:
      -isig
      do not enable interrupt, quit, and suspend special characters
      -icanon
      do not enable erase, kill, werase, and rprnt special characters
      -iexten
      do not enable non-POSIX special characters
      -echo
      do not echo input characters
      -echoe
      do not echo erase characters as backspace-space-backspace
      -echok
      do not echo a newline after a kill character
      -echoctl
      do not echo control characters in hat notation ('^c')
      -echoke
      kill all line by obeying the echoctl and echok setting
      19200
      sets the speed to 19200 Bit/s

    Summarizing the settings prevent any additional manipulation of input or output.

-- PeterZumbruch - 2017-11-30

usbdev - dynamic device symlink and proper access rights

udev/udevadm allows to automatically assign (fixed) symbolic links for USB devices connected to the system pointing the current /dev entry point.

Prerequisites
you have to have admin rights.

How to
  • edit/create /etc/udev/rules.d/99-serial-permissions.rules
    • add the follwing line for general includes
      SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", SYMLINK+="$env{ID_SERIAL}", GROUP="users", MODE="0666"
      creates for every connected device of vendor id 0403 a symbolic link /dev/ to the connected device
    • for special devices those lines can be added in addition
      SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ENV{ID_SERIAL}=="FTDI_FT232R_USB_UART_A100dQ2B", SYMLINK+="hadcon2", GROUP="users", MODE="0666"
      SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ENV{ID_SERIAL}=="FTDI_FT232R_USB_UART_A600801P", SYMLINK+="olimex", GROUP="users", MODE="0666"

    • for special devices (e.g. HadCon2) those lines can be added in addition
      • SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ENV{ID_SERIAL}=="FTDI_FT232R_USB_UART_A100*", RUN+="/usr/bin/stty -F /dev/$kernel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke 115200 "
      • SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ENV{ID_SERIAL}=="FTDI_FT232R_USB_UART_A801*", RUN+="/usr/bin/stty -F /dev/$kernel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke 115200 "
  • to find out the IDs of connected systems
    udevadm info --export-db| grep FTDI| grep ID_SERIAL

  • Finally reload rules and trigger a reconnect:
    udevadm control --reload-rules
    udevadm trigger

Links
"Writing udev rules"
http://reactivated.net/writing_udev_rules.html
udev
https://wiki.ubuntuusers.de/udev/
"Tutorial on how to write basic udev rules in Linux"
https://linuxconfig.org/tutorial-on-how-to-write-basic-udev-rules-in-linux

-- PeterZumbruch - 2019-03-22

SSH config: Host Specific Identity

Using ssh config files in ~/.ssh/config allows to specify per host / host alias different user/identity to connect with and more necessary options.

Using the features of the config file of ssh in ~/.ssh one can specify host specific ssh options, including varying identities and users.

from: http://www.gelato.unsw.edu.au/archives/git/0611/31044.html

Example:
  • connecting to a specific host using a different identity file and user
    $> cat ~/.ssh/config
       Host private.host.com
          User myname
          Hostname host.com
          IdentityFile ~/.ssh/private-identity
       Host public.host.com
          User anotherName
          Hostname host.com
          IdentityFile ~/.ssh/public-identity
       Host git.host.com
          User git
          Hostname host.com
          IdentityFile ~/.ssh/git-identity
         
  • allows to replace:
    • ssh host.com -l myname -i ~/.ssh/private-identity
      by
      ssh host.com
    • commands which internally use ssh but do not allow to pass ssh options, e.g. git
      git clone git.host.com

-- PeterZumbruch - 2013-05-10

Linux: dhclient - dynamic hostname

Using dhclient exit hooks scripts allows to set e.g. the hostname dynamically

Based on the articles: and its own origin

dhclient and its scripting capabilities on enter and exit hooks allows to react on dynamic network environments.

Provided you have root privileges this can be achieved by creating a script file hostname created in /etc/dhcp/dhclient-exit-hooks.d/ (on Debian), which is sourced by dhclient after having updated/received its DHCP informations.

#!/bin/sh
   # Filename:     /etc/dhcp/dhclient-exit-hooks.d/hostname
   # Purpose:      Used by dhclient-script to set the hostname of the system
   #               to match the DNS information for the host as provided by
   #               DHCP.
   #
      
   # Do not update hostname for virtual machine IP assignments
   if [ "$interface" != "eth0" ] && [ "$interface" != "eth1" ] && [ "$interface" != "wlan0" ]
   then
           return
   fi
      
   if [ "$reason" != BOUND ] && [ "$reason" != RENEW ] && [ "$reason" != REBIND ] && [ "$reason" != REBOOT ]
   then
      return
   fi
   
   echo dhclient-exit-hooks.d/hostname: Dynamic IP address = $new_ip_address
   hostname=$(a=$(host $new_ip_address) || { false; } && { echo -n $a | cut -d ' ' -f 5 | cut -d "." -f 1; true; }) || unset hostname &&
   echo ${hostname?} > /etc/hostname &&
   hostname $hostname &&
   export HOSTNAME=$hostname &&
   echo dhclient-exit-hooks.d/hostname: Dynamic Hostname = $hostname

Applying those code lines:
sudo curl -s https://wiki.gsi.de/foswiki/pub/Epics/TipsLinuxDhclientDynamicHostname/_etc_dhcp_dhclient-exit-hooks.d_hostname -o /etc/dhcp/dhclient-exit-hooks.d/hostname && 
  sudo dos2unix /etc/dhcp/dhclient-exit-hooks.d/hostname && 
  sudo chmod a+r /etc/dhcp/dhclient-exit-hooks.d/hostname

Local testing at the prompt:
dhclient

-- PeterZumbruch - 2018-11-30

Linux: dhclient - dynamic mount point

Using dhclient exit hooks scripts allows to set a mount point depending on the network environment, in this example for the HADES setup

Based on the articles: and its own origin

dhclient and its scripting capabilities on enter and exit hooks allows to react on dynamic network environments.

Provided you have root privileges this can be achieved by creating a script file mount_var_diskless created in /etc/dhcp/dhclient-exit-hooks.d/ (on Debian), which is sourced by dhclient after having updated/received its DHCP informations.

#!/bin/sh
# Filename:     /etc/dhcp/dhclient-exit-hooks.d/mount_var_diskless
# Purpose:      Used by dhclient-script to set mount HADES's var/diskless filesystem 
#               from either the local net (preferred) or the GSI network
#

# Do not update hostname for virtual machine IP assignments
if [ "$interface" != "eth0" ] && [ "$interface" != "eth1" ] && [ "$interface" != "wlan0" ]
then
return
fi

if [ "$reason" != BOUND ] && [ "$reason" != RENEW ] && [ "$reason" != REBIND ] && [ "$reason" != REBOOT ]
then
return
fi

var_diskless_hades=192.168.100.50
var_diskless_gsi=140.181.75.158 
var_diskless_path=/var/diskless/dreamplug
var_diskless_mount=/var/diskless/dreamplug

echo dhclient-exit-hooks.d/mount_var_diskless: new domain-name-servers: $new_domain_name_servers 

echo "$new_domain_name_servers" | grep -q $var_diskless_hades && var_diskless_addr=$var_diskless_hades || var_diskless_addr=$var_diskless_gsi

#clean up, but only different mounts
grep -v "$var_diskless_addr:$var_diskless_path" /etc/mtab | grep -q "$var_diskless_mount" && umount $var_diskless_mount 

#mount
[ -d "$var_diskless_mount" ] || mkdir -p $var_diskless_mount
grep "$var_diskless_addr:$var_diskless_path" /etc/mtab | grep -q "$var_diskless_mount" || mount $var_diskless_addr:$var_diskless_path $var_diskless_mount

echo dhclient-exit-hooks.d/mount_var_diskless: mounted $var_diskless_addr:$var_diskless_path

unset var_diskless_hades 
unset var_diskless_gsi 
unset var_diskless_path 
unset var_diskless_mount

Finally make sure the file is readable:
chmod a+r /etc/dhcp/dhclient-exit-hooks.d/mount_var_diskless

Local testing at the prompt:
dhclient -v

-- PeterZumbruch - 2013-10-21

Linux: Hades Network - Allow Client To Connect Via Gateway

To allow clients to connect outside of Hades network:
  • with root privileges
ip r a default via 192.168.100.90 dev eth0

-- WikiGuest - 1970-01-01

Linux: How To Clone A SD Card

Following the help of page https://startingelectronics.org/articles/raspberry-PI/ten-things-raspberry-PI chapter 10.

This video View on YouTube → shows how to clone an SD card in Linux using the dd command line application.

The command for copying an SD card to an image file on your computer is:
sudo dd if=/dev/mmcblk0 of=~/raspi.img
The command for copying an SD card image to a new SD card is:
sudo dd if=~/raspi.img of=/dev/mmcblk0
Where:
  • ~/raspi.img is the location and file name of the image file.
  • /dev/mmcblk0 is the SD card device on the Linux system.

-- WikiGuest - 1970-01-01

Linux: Resize Raw Img File

see: http://www.vk3erw.com/index.php/16-software/33-raspberry-pi-how-to-resize-sd-card-image

-- WikiGuest - 1970-01-01

/sbin/reboot: Input/output error

LinuxJournal-ReBootingTheMagicWay.png

-- WikiGuest - 1970-01-01

ProcServ: Remote Kill Via netcat

ProcServ usually needs a login to its port to execute a "CTRL+X" sequence to kill/restart the current child process. Thanks to this cmdline it is also able without. Thanks to J.Michel / M.Traxler, afaik.

Solution

Assuming that procServ is running its telnet session on port 12345 on localhost
echo -en "\x18" | netcat -w1 localhost 12345;

-- WikiGuest - 1970-01-01

-- WikiGuest - 1970-01-01

Hardware collection, evaluation

Introduction

The idea is to collect recommended hardware tools in use and experiences

serial ComPorts/ComServer - LAN ⇔ RS232

    EXSYS

    Experience and Users
    • 6030 used by Wuppertal group of CBM as alternative to WuT
      • up-to-now good experiences
      • less expensive than WuT

    Documentation

    W&T, WuT, Wiesemann & Theis

    Experience and Users
    • Used by HADES, EE/KS, CBM
    • Observations
      • - in connection with network settings, sometimes quiet stubborn → clumsy hardware reset necessary
      • - CBM @ COSY: showed in a radioactive environment (cave), (network) connection problems, 1 out of 3 ports operational
      • + good remote programming capabilities
      • + internal buffer, might overcome latencies

    Documentation

    -- PeterZumbruch - 2012-11-07

    Git Tips & Tricks

    Importing cvs into git, including history

    How to "Import a CVS repository into a bare git repository"

      # External CVSROOT, e.g. scs@lx-pool.gsi.de:/misc/hadesprojects/slowcontrol/cvsroot/
      URL_CVSROOT_EXTERNAL=<[User@]external CVSROOT directory>,
      CVSROOT_LOCAL=<local CVSROOT directory>
      # Git repository path: e.g. "hadesprojects-slowcontrol.git"
      GIT_TARGET_DIR=<New Git Repository>,
      # CVS Module to import MODULE=<CVS Module to extract>

      [ ! -z "$CVSROOT_LOCAL" ] mkdir -p "$CVSROOT_LOCAL" &&
      [ ! -z "$URL_CVSROOT_EXTERNAL" ] && rsync --progress -a "$URL_CVSROOT_EXTERNAL/" $CVSROOT_LOCAL
      [ ! -z "$GIT_TARGET_DIR" ] && GIT_TARGET_REPOSITORY=${GIT_TARGET_DIR%%.git}.git && mkdir -p $GIT_TARGET_REPOSITORY &&
      cd $GIT_TARGET_REPOSITORY &&
      git init --bare &&
      [ ! -z "$MODULE" ] && time git cvsimport -i -o cvshead -p xv -v -k -d $CVSROOT_LOCAL -C $GIT_TARGET_REPOSITORY $MODULE >&/tmp/cvsimport.log ||
      echo "import of module \'$MODULE\' of CVS repository \'$URL_CVSROOT_EXTERNAL\' into \'$GIT_TARGET_REPOSITORY\' failed"

    -- PeterZumbruch - 2014-11-03

    Submodule

    git submodule
    , illustrated in a few command line examples.
    TIP These examples require at least version 1.7.

    adding a submodule to a git directory

    • git submodule add
    • git submodule
    • git submodule init

    retrieving a repository with submodules

    • git clone
    • git submodule update

    converting a repository into projects with submodules

    (H.Brand)
    • create new branch
    • go into sub directory
    • git init
    • create remote bare repository
    • push to (final) remote repository
    • delete local sub directory and
    • replace by add submodule pointing to remote,
    • commit
    • checkout and test
    • merge new branch into current "master"

    -- PeterZumbruch - 2014-11-03

    Git Workflow

    Possible Git Workflow

    (https://raw.githubusercontent.com/AnarManafov/GitWorkflow/master/GitWorkflow_fig1.png)

    GitWorkflow_fig1.png

    -- PeterZumbruch - 2014-11-14

    -- PeterZumbruch - 2014-11-14

    -- PeterZumbruch - 31 Oct 2014
Topic attachments
I Attachment Action Size Date Who Comment
cris-axis-setup.shsh cris-axis-setup.sh manage 0.8 K 2009-04-09 - 09:11 PeterZumbruch cris-axis-setup.sh: Bash script for cris-axis setup
Edit | Attach | Print version |  PDF | History: r25 | r23 < r22 < r21 < r20 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r22 - 2014-10-31, PeterZumbruch
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)