Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7062777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:38:05+00:00 2026-05-28T04:38:05+00:00

I created an account on GitHub and I’m facing a problem with adding files.

  • 0

I created an account on GitHub and I’m facing a problem with adding files. I have added readme.txt. Also, I have 3 other PHP files and a folder including images.

How do I add the files and folder? I tried it with git pull because git push origin -u master showed me an error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T04:38:06+00:00Added an answer on May 28, 2026 at 4:38 am

    You can add files using git add, example git add README, git add <folder>/*, or even git add *

    Then use git commit -m "<Message>" to commit files

    Finally git push -u origin master to push files.

    When you make modifications run git status which gives you the list of files modified, add them using git add * for everything or you can specify each file individually, then git commit -m <message> and finally, git push -u origin master

    Example – say you created a file README, running git status gives you

    $ git status
    # On branch master
    # Untracked files:
    #   (use "git add <file>..." to include in what will be committed)
    #
    #   README
    

    Run git add README, the files are staged for committing. Then run git status again, it should give you – the files have been added and ready for committing.

    $ git status
    # On branch master
    # Changes to be committed:
    #   (use "git reset HEAD <file>..." to unstage)
    #
    #   new file:   README
    #
    
    nothing added to commit but untracked files present (use "git add" to track)
    

    Then run git commit -m 'Added README'

    $ git commit -m 'Added README'
    [master 6402a2e] Added README
      0 files changed, 0 insertions(+), 0 deletions(-)
      create mode 100644 README
    

    Finally, git push -u origin master to push the remote branch master for the repository origin.

    $ git push -u origin master
    Counting objects: 4, done.
    Delta compression using up to 2 threads.
    Compressing objects: 100% (2/2), done.
    Writing objects: 100% (3/3), 267 bytes, done.
    Total 3 (delta 1), reused 0 (delta 0)
    To xxx@xxx.com:xxx/xxx.git
       292c57a..6402a2e  master -> master
    Branch master set up to track remote branch master from origin.
    

    The files have been pushed successfully to the remote repository.

    Running a git pull origin master to ensure you have absorbed any upstream changes

    $ git pull origin master
    remote: Counting objects: 12, done.
    remote: Compressing objects: 100% (4/4), done.
    remote: Total 8 (delta 4), reused 7 (delta 3)
    Unpacking objects: 100% (8/8), done.
    From xxx.com:xxx/xxx
     * branch            master     -> FETCH_HEAD
    Updating e0ef362..6402a2e
    Fast-forward
     public/javascript/xxx.js |    5 ++---
     1 files changed, 2 insertions(+), 3 deletions(-)
     create mode 100644 README
    

    If you do not want to merge the upstream changes with your local repository, run git fetch to fetch the changes and then git merge to merge the changes. git pull is just a combination of fetch and merge.

    I have personally used gitimmersion – http://gitimmersion.com/ to get upto curve on git, its a step-by-step guide, if you need some documentation and help

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So: 1) I have created my account on github and I've created a repository
I have created a GitHub account. I'd like to know how to use it
I have created login account on my localhost\sql2008 Server (Eg. User123) Mapped to Database
I've created a custom object, I have it appearing automatically on the Account details
I have an FTP account created and it works fine with an FTP client
Does anyone had the luck to have this configured correctly? Created an account on
I created a new GitHub account with new keypair and setup everything and can
I have a GitHub account. I have a Visual Studio 2010 with Git Extensions
I've created a new account at github for a company, and I cloned my
I am very new to Github. I just created one github account and it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.