Start working with a GIT repository

In one of the previously post, I talked about how to push your work at github.com using eclipse IDE. In this post I will show you how to “grab” (git term is clone) a repository from git hub.com and start adding new feature.

First thing, first thing to do is to have a git repository at github.com. Login into your account at github.com, and create an empty repository using the + sign located at the upper right page. Click new repository. At this point, you have to make some decisions related to you repository setting (do you want it to be private or public? If you want, you can add a license or a .gitignore file.

Choose your newly created GIT repository settings
Choose your newly created GIT repository settings

Now it is time to clone your GIT repository to a local directory. Open a terminal or command prompt window (depends on your operating system and navigate to the directory where you wants to put your repository. Run the git clone command (use your HTTP URL):

You can now open the newly cloned GIT repository into eclipse: File -> Import ->Projects from Folder or Archive and it is time to add some files to your repository.

Next step is to add your files to the staging area, commit them, and push to the remote repository at github.com. Use git status to check the modified files, and git add command to add the files to the staging area.

You can use git remote -v to check the remote repository you are connected to. Use:

and

Now your code is at github.com.

You can study more on this subject on github pages:

Happy Coding !!!

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Leave a Reply