Today i was late, I reached TCC at 09:35 AM because last night i suffered from fever and cold.

From 09:45  AM to 12:00 AM, I learned a  new thing. This is not a new thing because daily i learn new things. Sir told me to upload code and “CAD Script” on git-hub. But i have no idea what is git-hub?

Why we use git-hub?

how we can use it?

What is the difference between wordpress and git-hub?

There was so many questions arisen in my mind.

It’s time to search answers.

My friend Navdeep was sitting with me.I asked her what is git-hub. She said, “opened my blog and check, I have posted how to use git-hub.” 

But that was not useful, she missed some points. I have taken help from Google and from Mandeep.

          Points to set up git-hub and create repository:

1. Open ” https://github.com “.

a. Enter Username. For ex: Soni.

b. Enter your Email id.

c. Create your Password.

d. Now, click on Sign up.

2. New page will open. Click on Set up Git. Follow the instructions from the given link to download, install and setup git.

               https://help.github.com/articles/set-up-git

3. Create a repository by following the instructions from the given link

               https://github.com/new

Give a repository name. Suppose if you want to store the code for Python script, then give it “Python-scripts” name.After this, click on ” create a repository ” icon.

4. After creating a repository, go to this link

            https://help.github.com/articles/create-a-repo

   Open your terminal, give command by following instructions.

4. Create a clone of the repository

        $  git clone git://github.com/username/repositoryname.git

    Go to directory

        $ cd repositoryname/

if you want to upload files on repository git-hub, manually save the files in repositoryname folder, then on the terminal

       $ git add .

         (.)for to upload all files

    Then

      $ git commit -m ” Any message”

      $ git push

 It gives you error——use git@github.com:username/repositoryname.git

    $ git push git@github.com:username/repositoryname.git

It gives you error ——-Permission denied

6. This error is removed by generating ssh keys from the following link

      https://help.github.com/articles/generating-ssh-keys

 After add this key, Open the terminal give command again.

 Now give

     $ git push git@github.com:username/repositoryname.git

Now you can check your git-hub account, files are uploaded.

5. If you want to remove some file, then give

   $  git rm filename

   $ git commit -m “Any message”

   $ git status

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s