Upload A File To New Github Repository

Home » CentOS » Upload A File To New Github Repository
CentOS 3 Comments

Though I’ve used version control systems before and even set up a couple over the years, and though it was simple to setup a github repository
(which I did just a couple minutes ago), I can’t figure out how to upload the first file to it. I’m logged in, on the repository’s home page, but can’t see an option for that. I also read instructions for set up on the web and the git manpage, but no help there. Anybody here know to put a code file into the repository?

Thanks.

3 thoughts on - Upload A File To New Github Repository

  • Sounds like you’re trying to add the file from the web interface. Usually you add the files via the filesystem you’ve cloned the repo to. Ex:

    git clone https://git.com/username/my-repo cd my-repo
    [edit/add files]
    git status # to preview your chnages git commit -m”Adding new and changed files to my repo”
    git push

    Then go to https://git.com/username/my-repo

    and you should see the changes. I’m assuming you’re putting all your changes in your master branch.

    I guess you can files via the web interface, but I’ve never done that.

    …adam

  • Hey, fellow Cleveland dude!

    Thanks much. That worked fine, though I did have to do a “git add”
    after adding file(s) in. It got the files where they needed to go.

    You might have noticed another post here from me about it, but what I
    put out there was a gnumeric workbook I’ve been using for a long time to do my taxes– Federal, state of Ohio, and local (which you as a Cleveland guy know as RITA). So if you haven’t done your taxes yet, it might help. < https://github.com/gebser/US-taxes-gnumeric.git>

    Thanks again.

LEAVE A COMMENT