Wednesday, September 20, 2017

Source Code versioning Control using Git command for repository

Source code versioning is important feature for developing big project. There are some technique to run the git commands.
git initial access for the new developer to access the remote repository
===============================
git config --global user.name "Khurshed Alam Nayeem"
git config --global user.email "csenayeem025@gmail.com"
git config --global core.editor "'C:/Program Files (x86)/Notepad++/notepad++.exe' -multiInst -nosession"
git config user.name
git config user.email
git clone https://username:password@github.com/evigtsaf/fast-give.git/ fastgive
===============================
Using git, add remote repository in the local operating system by following the commands.
===============================
git remote -v
git remote rm origin
git remote add staging https://username:password@github.com/tvbd/tv_bn_web_staging.git tv_bn_web_staging
git fetch staging master
git pull staging master
===============================
git remote add production https://username:password@github.com/tvbd/tv_bn_web_production.git tv_bn_web_production
git fetch production master
git pull production master
Working in the different brunch by following git commands
===============================
git checkout -b nayeem    //create brunch
git checkout -b development origin/development
git branch -a // list of all branch
git checkout newconversica
git branch nayeem
git checkout master
git merge nayeem
git push origin master
==============================
git status
git pull production master
git stash/pull/stash pop
git add .
git add -A
git commit -m 'fixed some code'
git push production master
==============================
git reset --hard
==============================
ctrl+O-------ctrl+C----------ctrl+X
==============================
/*======working in master=========*/
git stash  // save local copy
git pull origin master
git stash pop            // merge local & server
git add .
git commit -m 'initial project version'
git push origin master
=======Before BDCOM========
git init
git add .
git commit -m "Initial commit"
git remote add origin https://username:password@github.com/tvbd/tv_bn_site_production.git
git push origin master
==================================
git push origin master --force
rm -f ./.git/index.lock
git --version
git push -f origin master:master

No comments: