| GIT tutorial |
|
| Written by Administrator | |
| Monday, 22 March 2010 | |
|
STEP:1
Create an account in gitorious and create a project. Then add a SSH key. Adding an SSH key Open terminal. Type the following $ssh-keygen Then save the key in any file. STEP 2: .gitconfig Edit the .gitconfig file like follows: [user] name = your_name email = your_email [color] status=auto branch=auto ui=auto [alias] gl= "log --graph --pretty=oneline --abbrev-commit" STEP:3 Create a local repository for your project. ie., a folder in the name of your project. For example: My local repository was "aish". Add all the project files in the folder. aishwarya@aishwarya-desktop:~$cd aish aishwarya@aishwarya-desktop:~/ aish$git init Initialized empty Git repository in /home/aishwarya/aish/.git/ aishwarya@aishwarya-desktop:~/aish$git add . aishwarya@aishwarya-desktop:~/aish$ git commit (After this command u fill find a text editor, type "first commit", then press f2 and y to save) Created initial commit fb0e966: first commit 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 aish aishwarya@aishwarya-desktop:~/aish$ git status # On branch master nothing to commit (working directory clean) aishwarya@aishwarya-desktop:~/aish$ git gl * fb0e966... first commit aishwarya@aishwarya-desktop:~/aish$ git remote add origin This e-mail address is being protected from spam bots, you need JavaScript enabled to view it :a-sample-project/a-sample-project.git (This will be given in the gitorious project page) aishwarya@aishwarya-desktop:~/aish$ git push origin master Counting objects: 3, done. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 261 bytes, done. Total 3 (delta 0), reused 0 (delta 0) To This e-mail address is being protected from spam bots, you need JavaScript enabled to view it :a-sample-project/a-sample-project.git * [new branch] master -> master => Syncing Gitorious... [OK] aishwarya@aishwarya-desktop:~/aish$ git gl * fb0e966... first commit aishwarya@aishwarya-desktop:~/aish$ Follow the e-book http://shakthimaan.com/downloads/glv/presentations/di-git-ally-managing-love-letters.pdf |
| < Prev | Next > |
|---|
