Pushing a repository onto GitHub

I set up my own Git repository on my own server, and created a repository. I am new to Git, and all I do at the moment is git add *, git commit, and git push. I am not all that familiar with git.

Now, I would love to create a repository on Git Hub, so that the remote GitHub repository has the same list of changes I have on my own server.

I don’t suppose you could give me a list of steps, as well as an explanation of what each step will do? My main concern is that I don’t want to ruin my current repository.

UPDATE: Thank you everybody. I still don’t quite get how GIT works (I am sure I will at some point), but: https://github.com/mercmobily/hotplate 😀

  • Git telling me to pull, then commit, then pull?
  • Git commiting and pushing
  • On GitHub API - what is the best way to get the last commit message associated with each file?
  • Cloning only a specific branch on Github?
  • How to setup submodule so that git clone --recursive always takes master of submodule
  • Syncing forked repo with upstream/master or upstream/develop?
  • Suggestions on how to handle branches in git for unfinished user stories
  • Facebook signed request problem
  • 4 Solutions collect form web for “Pushing a repository onto GitHub”

    Don’t have time to write a full solution, but basically you need to:

    # create a nickname for your github account. In this case it is github
    git remote add github your-github-repo-path
    

    Keep committing the changes locally and pushing them. When you want to push also to github, execute:

    #push the changes to the repo on the 'github' nickname, to the branch master
    git push github master
    

    Here’s something that might help GIT_HOW_TO But I believe there are just too many resources on the internet that would help you do it. Steps to setup your repo on github is well mentioned on their Help_Page Please go throught this and if you have any question feel free to ask. BTW Welcome to Git 🙂

    Create a new repository on GitHub, as here: https://help.github.com/articles/creating-a-new-repository

    Then do steps 4 and 5 from here: https://stackoverflow.com/a/8012698/705048

    Create a repository and add your remote path to your local machine

    In your local machine switch to remote git path

    cd ../../../
    
    git pull "name " master 
    
    pwd:"enter your password"
    
    git add Filename
    
    git commit -m "Comments on files"
    
    git push "name" master
    

    i hope this could help you , correct me if ‘m worng

    Git Baby is a git and github fan, let's start git clone.