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 6763671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:30:15+00:00 2026-05-26T14:30:15+00:00

How can I import source code from my computer to my GitHub account?

  • 0

How can I import source code from my computer to my GitHub account?

  • 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-26T14:30:16+00:00Added an answer on May 26, 2026 at 2:30 pm

    If you’ve got local source code you want to add to a new remote new git repository without ‘cloning’ the remote first, do the following (I often do this – you create your remote empty repository in bitbucket/github, then push up your source)

    1. Create the remote repository, and get the URL such as git@github.com:/youruser/somename.git or https://github.com/youruser/somename.git

      If your local GIT repo is already set up, skips steps 2 and 3


    2. Locally, at the root directory of your source, git init

      2a. If you initialize the repo with a .gitignore and a README.md you should do a git pull {url from step 1} to ensure you don’t commit files to source that you want to ignore 😉

    3. Locally, add and commit what you want in your initial repo (for everything, git add . then git commit -m 'initial commit comment')


    4. to attach your remote repo with the name ‘origin’ (like cloning would do)
      git remote add origin [URL From Step 1]

    5. Execute git pull origin master to pull the remote branch so that they are in sync.
    6. to push up your master branch (change master to something else for a different branch):
      git push origin master
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can import MySQLdb from the interactive python command line but Zope gives me
A user can import data into our website from a file. The data normally
How can you import a new chunk of code (an Emacs lisp library) into
How can I import a variable from an external file? What I want to
Two questions: How can I import a file from a web address, without a
this is the code in my models file: from django.db import models class Studio(models.Model):
I have a bunch of source code checked out from a SVN repository, now
Stated here , one can invoke Jython in source code in Unix platforms. I've
How can a Python program easily import a Python module from a file with
I got this code for a parser from this link. http://www.warriorpoint.com/blog/2009/07/19/android-simplified-source-code-for-parsing-and-working-with-xml-data-and-web-services-in-android/ I am getting

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.