Tuesday, October 13, 2009

A sample GITORIOUS project

Create an account in gitorious and create a project.
Then add a SSH key.

Add a file called .gitconfig in the home folder like follows:

name = your_name
email = your_email
gl= "log --graph --pretty=oneline --abbrev-commit"

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 git@gitorious.org: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 git@gitorious.org:a-sample-project/a-sample-project.git
* [new branch] master -> master
=> Syncing Gitorious... [OK]
aishwarya@aishwarya-desktop:~/aish$ git gl
* fb0e966... first commit

this is the e-book which helped me..


My project is here

No comments:

Post a Comment