How to add GitHub project to eclipse?
Hello everyone, welcome to the learning path of programming. Today, in this article we are going to discuss various topics like how can we create a GitHub repository how do we clone the repository in eclipse and then we will see how do we add the eclipse project to your GitHub repository and then finally we will see how do we commit push and pull the changes inside the repository so, let us start.
How to create a GitHub repository?
So, Step number one is.
Step 1: Create a GitHub account with a sign in
You will have to create an account on GitHub so, you will go to your browser and you will go to GitHub so, you will say GitHub and the very first website you will get that and github.com so, you will go there and you will create your account so, you will add your you will pick a username you can give some email id or valid email id and then choose a password and then you will sign up for GitHub you will get a link in your email to verify your account and then you will verify and then finally you will sign in so you already will have an account so you will just sign in to your account and now there you will get that page and there you will see that start a project a button so, this is the step no. two
Step 2: Start a project = create a repository
Then you will have to start a new project so you will go and start a new a project and you can give any name so you will give that is a test project and then you will give some description which will optional and make it public and then you will create the repository so click on create a repository and there you will have that new repository and you will have a link of that repository there so now you will go back.
How to clone the repository in eclipse?
Now, what will you do is step number three is
Step 3: Start eclipse
You will start your eclipse so you will go to your eclipse now so that will be an eclipse and you will have to go to git repository perspective so will you see this open perspective button there if you will click there on open perspective and then you from there you will have to select git repository also you will start typing git repository there and you will get this perspective and git repository so select git repositories and there you will get that git repositories window and there you will have buttons so that will be an add an existing local git repository that button will be to clone your git repository and the clone to this view and then you will have to create you git repository so in your case you will already have created your git repository so you will click on that clone or git repository and add that grown to that view so you will click there and before you will add so step no. four will be
Step 4: Go to perspective >> git repositories and click on add git repository
Now, you will add the URL there so you will copy that URL from there that just copy it from there and then go back to eclipse and just paste it there it will take all the hosts and repository path itself and then you will give your authentication which will be your user and the password of GitHub account and even if you will not give it will ask you later on so if you will say next there so it will search for the repository and then finally it will have given you that window you will select next again and then it will give you the local directory so you will change that if you want and then you will say finish and you will see that progress there so it will be cloning the repository from the GitHub remote repository and finally you will see that project will have come there so you will have got your repository into your eclipse now the next thing is you will have to create a project in eclipse and add to this repository. I hope, all this will make you more eager to learn about what you can do with GitHub projects and eclipse.