Tuesday, March 1, 2016

Git Merge

git checkout 2.3
git pull origin 2.3
so that u have all 2.3 changes.
then git checkout 2.4
git pull origin 2.4
so that u have all 2.4 changes
i mean locally u have both branches updated
now to merge 2.3 to 2.4
we should be on 2.4 branch
in brackets git show current branch if u using cmd line.
now for merging just do this
git merge 2.3
this would bring all 2.3 changes to 2.4
it would show merge conflict issues if any
 on cmd line
resolve issues
you need to do this manually or using some diff checker

then to commit all these local changes to 2.4
git add .
git commit -am "merge 2.3 to 2.4"
git push origin 2.4
 it would push all merged code to 2.4 branch



Git Process Commands


To change from one branch to other brach

git checkout -b  
ex:  git checkout -b 3.3 



To Undo the last commit or stash the last commit
git stash    -- Do the merge, and than pull the stash:
git stash pop --get the commited files to current branch


Reset the last commit in local
To discard the local changes using
sy: git reset --hard



To change the Last commit message in git



git commit --amend

will open your editor, allowing you to change the commit message of the most recent commit. Additionally, you can set the commit message directly in the command line with:

git commit --amend -m "New commit message"



To get the patch to file (all changes to specified file)


Git diff > sample.txt

Monday, February 22, 2016

Add text at the beginning of a line in vim

The substitute command can be used to insert (or replace) text. Some examples:

:s/^/new text / Insert "new text " at the beginning of the line.
:s/$/ new text/ Append " new text" to the end of the line.
:s/green/bright &/g Replace each "green" with "bright green" in the line.
By default, each command operates on the current line. If you visually select some text before entering the command, it will operate on each line in the visual selection. See Search and replace for details.
Or you can insert a range immediately after the colon, for instance :.-5,$s/ etc. to substitute from 5 lines above the cursor to the end of the file.

:s/^/test /  ----insert "test" at the beginning of each line.
:%s/^/test / --- insert "test" at the end of each line .

Saturday, February 6, 2016

Delete Files Older Than x Days on Linux

find /path/to/files* -mtime +5 -exec rm {} \;
ex: find /opt/test/patch/* -mtime +7 -exec rm {} \;

The first argument is the path to the files. This can be a path, a directory, or a wildcard as in the example above. I would recommend using the full path, and make sure that you run the command without the exec rm to make sure you are getting the right results.
The second argument, -mtime, is used to specify the number of days old that the file is. If you enter +5, it will find files older than 5 days.
The third argument, -exec, allows you to pass in a command such as rm. The {} \; at the end is required to end the command.

How to convert PPK file to ssh remote server in ubuntu


1.sudo apt-get install putty
2.puttygen private.ppk -o private-key -O private-openssh (Where “private.ppk” is the PuTTY .ppk file to convert, and “private-key” is the name of the converted key file.)
3.ssh -i private-key username@remote-server-ip
Now, you can easily access the remote server using the openssh standard private key:

refurl: https://rbgeek.wordpress.com/2012/11/14/how-to-convert-ppk-file-to-ssh-remote-server-in-ubuntu/

Sunday, December 4, 2011

Siri vennela Song Lyrics 'సిరివెన్నల' సీతా రామ శాస్త్రి

ఎప్పుడూ ఒప్పుకోవద్దురా ఓటమి
ఎన్నడూ ఒదులుకొవద్దురా ఓరిమి

విశ్రమించవద్దు ఏ క్షణం
విస్మరించవద్దు నిర్ణయం
అప్పుడే నీ జయం నిశ్చయం రా

నింగి ఎంత పెద్దదైన రివ్వు మన్న గువ్వ పిల్ల రెక్క ముందు తక్కువేను రా
సంద్రమెంత గొప్పదైన ఈదుతున్న చేప పిల్ల మొప్ప ముందు చిన్నదేనూరా
పశ్చిమాన పొంచి ఉండి రవిని మింగు అసుర సంధ్య ఒక్క నాడు నెగ్గలేదు రా..
గుటక పడని అగ్గి ఉండ సాగరాన ఈదుకుంటూ తూరుపు ఇంట తేలుతుంది రా...
నిషా విలాసమెంత సేపు రా...ఉషోదయాన్ని ఎవ్వడాపు రా...
రగులుతున్న గుండె కూడా సూర్య గోళ మంటిదేను రా!

నెప్పి లేని నిముషమేది జననమైన మరణమైన జీవితాన అడుగు అడుగునా
నీరసించి నిలిచిపోతే నిమిషిమైన నీది కాదు ..బ్రతుకు అంటే నిత్య ఘర్షణ
దేహముంది ప్రాణముంది నెత్తురు ఉంది సత్తువున్ది ..ఇంతాకన్నా సైన్యము ఉండునా??
ఆశ నీకు అస్త్రం అవును..శ్వాస నీకు శస్త్రమౌను....ఆశయమ్ము సారధౌను ర

నిరంతరం ప్రయత్నముండగా నిరాశ కే నిరాశ పుట్టదా..
ఆయువు అంటూ ఉన్న వరకు చావు కూడా నెగ్గలేక శవము పైనే గెలుపు చాటు రా....

Thursday, February 11, 2010

Tag Lines


-Do not fear going forward slowly; Fear only to stand still.
-
A good listener is not only popular everywhere, but after a while he knows something.