Downloading the dCache GIT repository
- Ensure that you have a valid PIC LDAP account and ensure that you have enough permissions to read/write the dCache GIT repository.
- Download the dCache GIT repository with the following command and by correctly login to the repository:
git clone https://puppet03.pic.es/repos/dcache
- You may need also to download the following GIT repositories where some of them are used by the dCache GIT repository:
git clone https://puppet03.pic.es/repos/common
git clone https://puppet03.pic.es/repos/postgres
git clone https://puppet03.pic.es/repos/certificates
git clone https://puppet03.pic.es/repos/ganglia
git clone https://puppet03.pic.es/repos/yaim_conf
Using GIT master and branches
'master' and 'centos7' branch
- All production SL6 puppet code should be written in the master branch.
git checkout master
git commit -a -m "master: <commit_msg>"
git push origin master
- All production SL7 puppet code should be written in the centos7 branch.
git checkout centos7
git commit -a -m "centos7: <commit_msg>"
git push origin centos7
- Make sure that SL6 and SL7 have the same changes whenever possible.
git diff centos7 master
Working with GIT
Create a new branch
git checkout -b <branch_name>
git commit -a -m "<branch_name: <msg>"
git push origin <branch_name>
Merging branch and master
git checkout master
git merge <branch_name>
git push origin master
Delete a branch
git branch -d <branch_name>
Keep local branch & delete branch from server
git push --delete origin <branch_name>