GIT – How to and configure GIT on Ubuntu

sudo apt-get install git-core gitosis git-doc

Creating GIT user

sudo adduser git

Creating directory for repositories

sudo mkdir /home/git/yourrepositories
sudo chmod 775 /home/git/yourrepositories

Run this on your yourrepositories

git init
git add .
git commit –a -m “your Commit comments”

How to use GIT repository on Window

Download GIT

Install this software on your computer.

Run this command

git clone [email protected]:~/complete/path/here/projectname foldername

projectname* is project you want to clone

foldername* is a name of folder where you want to clone the project by default clone with same projectname

cd foldername/

git branch

to check the list of branched exits

git checkout -b new_branch

create new branch for your clone project

PUSH DATA TO MASTER

git add .

to add changes and new file to repositry

git commit -a -m ‘your comment about changes’

git push origin new_branch

MERGE DATA TO MASTER BRANCH

git merge new_branch

that it is to be done on the system from which clone is done

GET RECENT CHANGES FROM MASTER

git pull origin master

 

Print Friendly, PDF & Email

Comments

comments

Bài viết liên quan