Putting your existing work on GitHub Enterprise can let you share and collaborate in lots of great ways.

Tip: If you're most comfortable with a point-and-click user interface, try adding your project with one of our desktop applications. For more information, see "How do I add repositories?" for Mac, and "Adding repositories with GitHub for Windows" for Windows.

  1. Create a new repository on your GitHub Enterprise instance. Do not initialize the new repository with a README file. Create New Repository drop-down
  2. In Terminal, change the current working directory to your local project.
  3. Initialize the local directory as a Git repository.

    git init
    
  4. 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
    
  5. 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
    
  6. In your GitHub Enterprise repository, in the right sidebar, copy the remote repository URL. Copy remote repository URL field

  7. In Terminal, add the URL for the remote repository where your local repostory will be pushed.

    git remote add origin <remote repository URL>
    # Sets the new remote
    git remote -v
    # Verifies the new remote URL
    
  8. Push the changes in your local repository to your GitHub Enterprise instance.

    git push origin master
    # Pushes the changes in your local repository up to the remote repository you specified as the origin
    
  1. Create a new repository on your GitHub Enterprise instance. Create New Repository drop-down
  2. In the Command prompt, change the current working directory to your local project.
  3. Initialize the local directory as a Git repository.

    git init
    
  4. 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
    
  5. 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
    
  6. In your GitHub Enterprise repository, in the right sidebar, copy the remote repository URL. Copy remote repository URL field

  7. In the Command prompt, add the URL for the remote repository where your local repostory will be pushed.

    git remote add origin <remote repository URL>
    # Sets the new remote
    git remote -v
    # Verifies the new remote URL
    
  8. Push the changes in your local repository to your GitHub Enterprise instance.

    git push origin master
    # Pushes the changes in your local repository up to the remote repository you specified as the origin
    
  1. Create a new repository on your GitHub Enterprise instance. Create New Repository drop-down
  2. In Terminal, change the current working directory to your local project.
  3. Initialize the local directory as a Git repository.

    git init
    
  4. 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
    
  5. 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
    
  6. In your GitHub Enterprise repository, in the right sidebar, copy the remote repository URL. Copy remote repository URL field

  7. In Terminal, add the URL for the remote repository where your local repostory will be pushed.

    git remote add origin <remote repository URL>
    # Sets the new remote
    git remote -v
    # Verifies the new remote URL
    
  8. Push the changes in your local repository to your GitHub Enterprise instance.

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