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 code.google.com server. You can also get started to create an account from there. In code.google.com 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 code.google.com >> ~/.netrc echo login email@example.com >> ~/.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 code.google. Login value is also your google e-mail address. From on now, the time is adding our code.
touch test.inc git add test.inc git commit -m "test file has been added" git remote add myproject https://code.google.com/p/yourprojectname git push myproject master:master
After doing this, test.inc file has been added successfuly. Following the first push, inserting, deleting and updating will be made.
touch text.txt git status git rm test.inc 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. test.inc 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!