Git Short cuts.
Git Diff tool MELD. refer this:
install meld, then create /bin/git-meld as:
Now add the following to your ~/.gitconfig file
git init --bare --shared <repodir>
chown -R 775 is not needed.
do this on a non-empty repo
git init --shared.
get the setgid flag as : chmod -R 2XXX <repo directory>
Customized setup from http://git-scm.com/book/en/Git-on-the-Server-Setting-Up-the-Server.
install meld, then create /bin/git-meld as:
chmod 775 /bin/git-meld#!/bin/bash
meld $2 $5
Now add the following to your ~/.gitconfig file
Git bare repo:[diff]
external = git-meld
git init --bare --shared <repodir>
chown -R 775 is not needed.
do this on a non-empty repo
git init --shared.
get the setgid flag as : chmod -R 2XXX <repo directory>
Customized setup from http://git-scm.com/book/en/Git-on-the-Server-Setting-Up-the-Server.
basics step 0:
git config --global user.name "tkware"
git config --global user.email "test@testme.com"
at the server:
useradd -c 'Git User' -m gitcd /home
chown git:git git/ (as it was corrupted)
from desktop we use git client:
generate rsa-keys : ( no password )
[tperiasa@fts-vm-dev .ssh]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/tperiasa/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/tperiasa/.ssh/id_rsa.
Your public key has been saved in /home/tperiasa/.ssh/id_rsa.pub.
The key fingerprint is:
2d:11:a0:82:ab:22:88:20:1c:4e:74:2e:f7:36:57:24 tperiasa@fts-vm-dev
The key's randomart image is:
+--[ RSA 2048]----+
| . . .E.. |
.......
su git
ls -la /home/git/.ssh
cat id_rsa.pub >> /home/git/.ssh/authorized_keys
change git user shell to : /usr/bin/git-shell at /etc/passwd
mkdir /opt/git/cgi-bin.git
chown git:git cgi-bin.git/
cd /opt/git/cgi-bin.git
git init --bare --shared
[git@fts-vm-ci html.git]$ git init --bare --shared
Initialized empty shared Git repository in /opt/git/html.git/
change shared option from 1 to 0660 to preserve client user ownershiop on files.
[core]
repositoryformatversion = 0
filemode = true
bare = true
sharedrepository = 0660
[receive]
denyNonFastforwards = true
At the CLIENT??
login as user tperiasa or <user>
git git config --global user.name "tkware"
git config --global user.email "test@testme.com"
git git config --global user.name "tkware"
git init
cd <gitProject>
cat ~/.gitconfig
git add . <== add all files in current dir.
git commit -m "initial commit"
git remote add origin git@vm-ftss-oop:/opt/git/cgi-bin.git
(and/or)
git remote add origin git@fts-vm-ci:/opt/git/html.git
Force url to remote:git push origin mastergit remote set-url origin https://github.com/user/repo2.git
git config --list
git remote add origin git@vm-ftss-oop:/opt/git/cgi-bin.git
Checkout to different folder:
git clone git://github.com/tkware/actualGitProjectName.git mygritProjectName
Change remote origin ? Yes.
git remote set-url origin git@gitlab.cisco.com:tperiasa/html.git
git push -u origin master
Perl and Server Remote management:
1. /etc/hosts file need to have <server> and FQDN in one line so ORACLE drvier in linux x86_64 can talk to backend.FUNNY. Oracle driver 11 may not have this issue.
2. perlbrew_root and source the file needs to be added to /etc/bashrc
3. htmldoc x86_64 bit needs to be installed on Linux 64 bit and windows 32 bit version for win x86_64. 64 bit win has to be compiled from source . big headache.
4. printxxxx software needs to be installed on linux and windows?
ChartDirector NOT printXXXXXX needs to be installed for 64 bit under cgi-bin and right libraries to be installed under /usr/lib/local area...??
Git "Stash" ing temp changes.
Stash current 'dirty changes' made at main.
git stash
-- list to see what branch u need to xfer stash ed data into.
git branch -l
git checkout minorChanges
-- bring back stash to current branch.
git stash pop
-- add the changes to current branch.
git add ICE_LIBRARY/Fts/Ldap.pm
......
git add kt/kt.pm
git add timetrack/trackinfo.pm
git add ICE_LIBRARY/Fts/ftsLdapTest.pl
git add ICE_LIBRARY/Fts/citeisTest.pl
git add ICE_LIBRARY/Fts/authLdapTest.pl
--- commit changes
git commit -a -m 'changed ldap modules to use ds.cisco.com as per CITEIS guideline'
git status
git checkout master
git status
-- above step shows there are NO changes to main
-- do a merge with minorChanges
git merge minorChanges
===== May 13 2:33 am 2015 ====
[root@fts-vm-dev cgi-bin]# git status
# On branch tsepFtsChanges
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: .gitignore
# new file: ICE_LIBRARY/Fts/Security/Crypto.pm
# new file: ICE_LIBRARY/Fts/Security/autoSsh.sh
# new file: ICE_LIBRARY/Fts/Security/autoSsh1.sh
# new file: ICE_LIBRARY/Fts/Security/dateddir.pl
# new file: ICE_LIBRARY/Fts/Security/dateddir.pl~
# new file: ICE_LIBRARY/Fts/Security/expectSsh.sh
# new file: ICE_LIBRARY/Fts/Security/mootest.pl
# new file: ICE_LIBRARY/Fts/Security/script.exp
# new file: ICE_LIBRARY/Fts/Security/tarNdelete.pl
# new file: ICE_LIBRARY/Fts/Security/tarNdelete.pl-old
# new file: ICE_LIBRARY/Fts/Security/tarNdelete.pl~
# new file: ICE_LIBRARY/Fts/Utils/Mail.pm
# new file: ICE_LIBRARY/Fts/Utils/mailTest.pl
# new file: config/rsync-exclude-list.txt
# modified: quotenew/quotenew.pm
# new file: quotenew/quotenew_tsom_version.pm
# modified: timetrack/timeData.cgi
# modified: tsep/ep_json.cgi
# modified: tsep/tsepAO.cgi
# modified: tsep/tsepAcct.cgi
#
[root@fts-vm-dev cgi-bin]# git commit -m "tsepFtsChanges committed" <== why '-a' option missed
[tsepFtsChanges 958d9c7] tsepFtsChanges committed
21 files changed, 21576 insertions(+), 49 deletions(-)
create mode 100755 ICE_LIBRARY/Fts/Security/Crypto.pm
create mode 100755 ICE_LIBRARY/Fts/Security/autoSsh.sh
create mode 100755 ICE_LIBRARY/Fts/Security/autoSsh1.sh
create mode 100755 ICE_LIBRARY/Fts/Security/dateddir.pl
create mode 100644 ICE_LIBRARY/Fts/Security/dateddir.pl~
create mode 100755 ICE_LIBRARY/Fts/Security/expectSsh.sh
create mode 100755 ICE_LIBRARY/Fts/Security/mootest.pl
create mode 100755 ICE_LIBRARY/Fts/Security/script.exp
create mode 100755 ICE_LIBRARY/Fts/Security/tarNdelete.pl
create mode 100755 ICE_LIBRARY/Fts/Security/tarNdelete.pl-old
create mode 100644 ICE_LIBRARY/Fts/Security/tarNdelete.pl~
create mode 100755 ICE_LIBRARY/Fts/Utils/Mail.pm
create mode 100755 ICE_LIBRARY/Fts/Utils/mailTest.pl
create mode 100644 config/rsync-exclude-list.txt
create mode 100755 quotenew/quotenew_tsom_version.pm
[root@fts-vm-dev cgi-bin]#
[root@fts-vm-dev cgi-bin]#git checkout master; git status
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# ICE_LIBRARY/Fts/Utils/
# fileupload/files/FY15_FTSS_Bookings_05_04_15.xls
# fileupload/files/FY15_FTSS_Bookings_05_11_15.xls
# fileupload/files/GRMT_SLA_DATA_FF_150414.xls
# fileupload/files/GRMT_SLA_DATA_FF_150415.xls
# fileupload/files/GRMT_SLA_DATA_FF_150416.xls
# fileupload/files/GRMT_SLA_DATA_FF_150417.xls
# fileupload/files/GRMT_SLA_DATA_FF_150429.xls
# fileupload/files/GRMT_SLA_DATA_FF_150430.xls
# fileupload/files/SFDC_Global_FTS_Forecast_Report_051115_Prepared.xls
nothing added to commit but untracked files present (use "git add" to track)
[root@fts-vm-dev cgi-bin]#
Updating 57f0ecd..958d9c7
Fast-forward
.gitignore | 2 +
ICE_LIBRARY/Fts/Security/Crypto.pm | 16 +
ICE_LIBRARY/Fts/Security/autoSsh.sh | 25 +
ICE_LIBRARY/Fts/Security/autoSsh1.sh | 13 +
ICE_LIBRARY/Fts/Security/dateddir.pl | 74 +
ICE_LIBRARY/Fts/Security/dateddir.pl~ | 74 +
ICE_LIBRARY/Fts/Security/expectSsh.sh | 8 +
ICE_LIBRARY/Fts/Security/mootest.pl | 37 +
ICE_LIBRARY/Fts/Security/script.exp | 79 +
ICE_LIBRARY/Fts/Security/tarNdelete.pl | 62 +
ICE_LIBRARY/Fts/Security/tarNdelete.pl-old | 46 +
ICE_LIBRARY/Fts/Security/tarNdelete.pl~ | 36 +
ICE_LIBRARY/Fts/Utils/Mail.pm | 67 +
ICE_LIBRARY/Fts/Utils/mailTest.pl | 14 +
config/rsync-exclude-list.txt | 6 +
quotenew/quotenew.pm | 68 +-
quotenew/quotenew_tsom_version.pm |20785 ++++++++++++++++++++++++++++
timetrack/timeData.cgi | 193 +-
tsep/ep_json.cgi | 8 +-
tsep/tsepAO.cgi | 7 +
tsep/tsepAcct.cgi | 5 +
21 files changed, 21576 insertions(+), 49 deletions(-)
create mode 100755 ICE_LIBRARY/Fts/Security/Crypto.pm
create mode 100755 ICE_LIBRARY/Fts/Security/autoSsh.sh
create mode 100755 ICE_LIBRARY/Fts/Security/autoSsh1.sh
create mode 100755 ICE_LIBRARY/Fts/Security/dateddir.pl
create mode 100644 ICE_LIBRARY/Fts/Security/dateddir.pl~
create mode 100755 ICE_LIBRARY/Fts/Security/expectSsh.sh
create mode 100755 ICE_LIBRARY/Fts/Security/mootest.pl
create mode 100755 ICE_LIBRARY/Fts/Security/script.exp
create mode 100755 ICE_LIBRARY/Fts/Security/tarNdelete.pl
create mode 100755 ICE_LIBRARY/Fts/Security/tarNdelete.pl-old
create mode 100644 ICE_LIBRARY/Fts/Security/tarNdelete.pl~
create mode 100755 ICE_LIBRARY/Fts/Utils/Mail.pm
create mode 100755 ICE_LIBRARY/Fts/Utils/mailTest.pl
create mode 100644 config/rsync-exclude-list.txt
create mode 100755 quotenew/quotenew_tsom_version.pm
[root@fts-vm-dev cgi-bin]#
[root@fts-vm-dev cgi-bin]# git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)
[root@fts-vm-dev cgi-bin]#
[root@fts-vm-dev cgi-bin]# git push origin master
Counting objects: 43, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (30/30), done.
Writing objects: 100% (30/30), 8.84 KiB, done.
Total 30 (delta 15), reused 0 (delta 0)
To git@fts-vm-ci.cisco.com:/opt/git/cgi-bin.git
57f0ecd..958d9c7 master -> master
[root@fts-vm-dev cgi-bin]#
2015/05/19 midnight
200 git config --gloabl user.name "TK periasamy"
201 git config --global user.name "TK periasamy"
202 git config --global user.email "tperisa"
205 git init
206 git add .
208 cd .git
211 git commit
212 cd .git
216 git remote add origin git@fts-vm-ci:/opt/git/cgi-bin.git
217 git push origin master
225 ssh -p id_rsa.pub fts-vm-ci.cisco.com:/home/
2015/05/19 midnight
200 git config --gloabl user.name "TK periasamy"
201 git config --global user.name "TK periasamy"
202 git config --global user.email "tperisa"
205 git init
206 git add .
208 cd .git
211 git commit
212 cd .git
216 git remote add origin git@fts-vm-ci:/opt/git/cgi-bin.git
217 git push origin master
225 ssh -p id_rsa.pub fts-vm-ci.cisco.com:/home/
1034 sudo chown -R root.ftsdev html
-- below is just dummy setfacl access control??
1037 sudo setfacl -m g:ftsdev:rwx html/
1041 umask ==> gives 0002
1043 sudo chmod g+s html/ <== does not wrok recursive?? should it be with -R option?
1047 sudo chmod -R 2775 html/