Adding a project to github using cli & website

Here i tell about making a project and pushing the project to GitHub.

here i discuss everything about GitHub which help you to making and tell you that how you can push or pull your project to GitHub.

First of all i consider you that you have already a GitHub account.

1. Adding a project to GitHub using GitHub official website(beginner)

(a) Make log in and after you visit your profile. Just look like that

github

now click on new repository button

(b) Now you can see create new repository page. just look like that.

new repo

here you need to filling all required filled. after it your repository ready to go. And you are able to uploading your project files.

(c)Now it’s time to uploading your project files to your repository  . see the picture.

upload

here you some options like branch -master and upload files and create new file also. now you know that you

have already project files. Now it’s time to uploading a folder or files etc.

(d) Now you can click on uploading files and upload your files. just look like that.

here you can add a whole folder of your project or you can add files. after it use commit changes option which means you need to telling about your changes. after all your project repository is live for use by someone.

Note:- for adding folders use drag and drop option. and this option is not working for 100+ files in folder. for adding more files you need to command line interface which discuss in next section in this article.

2. Adding a project  using cmd prompt or cli (intermediate)

(i) Adding an existing project to github using cli (git bash or cmd prompt)

(a)  Create an new repository on GitHub. To avoid errors, do not initialize the new repository with README, license, or gitignore files. You can add these files after your project has been pushed to GitHub.

(b)  Open git Bash

(c)  Change the current working directory to your local project.

(d)  Initialize the local directory as a Git repository.

    $ git init

(e) Add the files in your new local repository. This stages them for the first commit.

    $ git add .

#  Adds the files in the local repository and stages them for commit. To unstage a file, use ‘git reset HEAD YOUR-FILE‘.

(f)  Commit the files that you’ve staged in your local repository.

     $ git commit -m "First commit"
     
     # Commits the tracked changes and prepares them to be pushed to a remote repository. To remove this commit and modify the file, use 'git reset --soft HEAD~1' and commit and add the file again.

(g)  At the top of your GitHub repository’s Quick Setup page, click  to copy the remote repository URL.

(h)  In the Command prompt, add the URL for the remote repository  where your local repository will be pushed.

     $ git remote add origin remote repository URL
     # Sets the new remote
     
     $ git remote -v
     # Verifies the new remote URL

(i) Push the changes in your local repository to GitHub. 

     $ git push origin master
     # Pushes the changes in your local repository up to the remote repository you specified as the origin
 
 

 

For any help comment , we help you

About

View all posts by

22 thoughts on “Adding a project to github using cli & website

  1. Pretty element of content. I simply stumbled upon your weblog and in accession capital to say that I acquire in fact
    enjoyed account your weblog posts. Any way I will
    be subscribing to your augment and even I success you get
    admission to persistently fast.

  2. That is very interesting, You’re a very skilled blogger.

    I have joined your rss feed and sit up for looking for extra of your fantastic post.
    Additionally, I’ve shared your website in my social networks

  3. Hello! Quick question that’s entirely off topic.
    Do you know how to make your site mobile friendly? My
    site looks weird when browsing from my iphone 4.
    I’m trying to find a theme or plugin that might be able to
    fix this issue. If you have any recommendations, please share.
    With thanks!

  4. Heya! I just wanted to ask if you ever have any issues with
    hackers? My last blog (wordpress) was hacked and I ended up losing
    months of hard work due to no data backup. Do you have any solutions
    to stop hackers?

  5. I’m impressed, I must say. Rarely do I encounter a blog that’s both educative and interesting, and without a doubt,
    you have hit the nail on the head. The issue is something that too few
    men and women are speaking intelligently about. I am very happy that I stumbled across this
    during my hunt for something regarding this.

  6. Hello there, I discovered your web site by way of Google at the same time as looking for a comparable matter, your site came up, it appears to be like great.

    I have bookmarked it in my google bookmarks.
    Hi there, simply became alert to your weblog thru Google, and found that it is truly
    informative. I am going to watch out for brussels. I’ll appreciate for those who proceed this in future.
    Numerous people shall be benefited from your writing.
    Cheers!

  7. I know this if off topic but I’m looking into starting my own blog and was wondering what
    all is required to get set up? I’m assuming having a blog like yours would cost a pretty
    penny? I’m not very web smart so I’m not 100% certain. Any tips or advice would be greatly appreciated.
    Kudos

  8. Magnificent beat ! I would like to apprentice while you amend your site, how can i
    subscribe for a blog web site? The account aided me a acceptable deal.
    I had been tiny bit acquainted of this your broadcast offered bright clear concept

  9. I’ve been exploring for a little for any high-quality articles or weblog posts
    in this sort of space . Exploring in Yahoo I eventually stumbled upon this site.
    Studying this info So i am happy to exhibit that I’ve an incredibly excellent uncanny feeling I discovered just what I needed.
    I most unquestionably will make sure to don?t forget this web site and
    give it a look regularly.

  10. Platinum Radiance 鉑金光燦 商品一覽 找品牌 以UrCosme指數高至低排序 第1頁 Platinum Radiance 鉑金光燦 化妝品商品一覽,提供 Platinum Radiance 鉑金光燦的產品列表,以UrCosme指數高至低排列,共0件,Platinum Radiance 鉑金光燦的搜尋結果之第1頁

Leave a Reply

Your email address will not be published. Required fields are marked *