Skip to main content

Posts

GIT command

https://kbroman.org/github_tutorial/pages/branching.html Note:- Always get pull request before working on any branch git pull  branch name or  git pull  origin branch name To commit code git commit -m"comment for changes" To push the code git push origin staging To hold the branch in the same state git stash To get the stashed branch in normal mode git stash pop If code conflict during git command or reverting conflict occur while git pull or branch chekout git reset -hard HEAD To get in working branch or switch to another branch git checkout staging To create a new branch git checkout -b branch name

Create virtual host or site in local ubuntu machine

To create a virtual host or local site in ubuntu machine, do the following things- 1) Put your contents in your local machine,                           for me its in "/var/www/html/workingdir/testdomainfolder" 2) Cd /etc/apache2/sites-available/ 3) Create a file name- "www.testdomain.com", do the following-     sudo vim www.testdomain.com 4) Write the following contents in "www.testdomain.com", change domain name according to your and write your document root <VirtualHost *:80> ServerName www.testdomain.com DocumentRoot /var/www/html/workingdir/testdomainfolder ScriptAlias /cgi-bin/ /usr/lib/cgi-bin <Directory /var/www/html/workingdir/testdomainfolder> Order allow,deny Allow from all Options +FollowSymLinks -Indexes AllowOverride All </Directory> <Directory /usr/lib/cgi-bin> Order allow,deny Allow from all Options None AllowOverri...

https://bitbucket.org . GIT COMMANDS

git status git add . git add xyx.php git commit -m"changes done" git push git config --global --edit git commit --amend --reset-author   git push --set-upstream origin master GIT   To create a new branch git checkout -b automon_115 git status git branch git push -u origin automon_115 git checkout master git diff To create a branch first time-   >.   git checkout -b cmdb_120

configuring python project in local

git clone https://devendra_kumarsingh@bitbucket.org/***********/automonitoring.git 1) create a virtual environment virtualenv automonitoring_env  for python- 2.7      virtualenv -p /usr/bin/python automonitoring_env 2) cd automonitoring_env/   // ENVIRONEMNT FOLDER 3)  source bin/activate 4)  cd ../automonitoring  // PROJECT FOLDER  5)  pip install -r pip_req.txt  To set a environment in pycharm - 1) click on app  2) edit configuration 3) add environment- dev then run  GET CLONE RUN- virtualenv PROJECT_FOLDER_NAME_env OR virtualenv -p /usr/bin/python fileupdate_env CD PROJECT_FOLDER_NAME_env THEN RUN-> . bin/activate OR source fileupdate_env/bin/activate CD ../SOURVE_CODE_FOLDER/ THEN RUN - pip install -r pip_req.txt   SET ENVIRONMENT-> CLICK ON APP-> EDIT CONFIGURATION THEN ADD-> “ENV AND VALUES DEV” To set  a virtual environment in ubuntu-...