Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Friday, August 23, 2013

Source Code Management Using Git

Hello everyone!
In this article, I want to talk about version control systems. Actually management source code using Git. We use Git on the projects in which multiple participants. Git is not the only way to use version control. There are others which are so popular; SVN, Mercurial and CVS.

In this article, we will continue using server. You can also get started to create an account from there. In server, there are SVN, Mercurial and Git options. So, before the processing clone your project to local machine, we define username and password to log in. Sure, you have to set Git software up first.

echo machine >> ~/.netrc
echo login >> ~/.netrc
echo password yourpassword >> ~/.netrc
chmod go= ~/.netrc

The code given above shows us what we code on your Git console screen. Password value is a unique key word given by Login value is also your google e-mail address. From on now, the time is adding our code.

git add
git commit -m "test file has been added"
git remote add myproject
git push myproject master:master

After doing this, file has been added successfuly. Following the first push, inserting, deleting and updating will be made.

touch text.txt
git status
git rm
git status -s
git add test.txt
git commit -m "some files has been changed"
git push

The commands given above, we can see touching and text file easily. file has been removed and created text.txt file, and logged "some files has been changed" message. After all, we push all change

git pull

Take care!