0% found this document useful (0 votes)
16 views4 pages

Moving Your Project To Github

moving project to github repo.

Uploaded by

hector triana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views4 pages

Moving Your Project To Github

moving project to github repo.

Uploaded by

hector triana
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Moving your Project to GitHub

A quick reference guide to complete the steps in the course.


https://lab.github.com/courses/moving-your-project-to-github/

1. Plan the move


1.1. On the right side of this issue, look for a section titled Labels
1.2. Click the (⚙ ) gear icon
1.3. Select the label that describes your project
1.4. Click the X at the top of the label panel when you are finished

2. Prepare the project


2.1. Remove any binary files from your repository
2.2. In your local environment, create a .gitignore file. Use a template or create
your own

3. Make the move

Import your project using GitHub Importer

3.1. Once you have the URL for your existing repository on Subversion, Mercurial,
TFS, or another Git server, navigate to the Code tab of this repository and
scroll down to the section labeled ...or import code from another repository
3.2. Click Import code
3.3. Type the URL for your repository in its old location
3.4. Click Begin import

Moving your local project

3.5. In the Code tab of this repository, copy the URL shown under Quick Setup
3.6. Follow the instructions below based on what tool you’d like to use locally

- Using the command line

3.7. In your command line, navigate to your project directory. Type git init to
initialize the directory as a Git repository
3.8. Type git remote add origin
https://github.com/YOUR-USERNAME/github-move.git
3.9. Type git add .
3.10. Type git commit -m “initializing repository”
3.11. Type git push -u origin master to push the files you have locally to the remote
on GitHub. (You may be asked to log in)

- Using GitHub Desktop

3.12. In GitHub Desktop, add a local repository by clicking File > Add a local
Repository , and then navigating to your local repository
3.13. Create your first commit by typing a summary commit message in the field
provided and clicking Commit to master
3.14. Add the remote by clicking Repository > Repository Settings … and pasting the
URL from your repository on GitHub into the “Primary remote repository
(origin)” field. Click Save
3.15. Click Publish in the top right corner to push your repository to GitHub

- Using Visual Studio Code

3.16. In Visual Studio Code, open the folder for your project
3.17. Click the icon on the left for Source Control
3.18. On the top of the Source Control panel, click the Git icon
3.19. If the files you see match the repository you want to create, click Initialize
Repository
3.20. Next to the word CHANGES, click the symbol of the plus sign to stage all of
the changes
3.21. In the box in the Source Control panel, type a commit message. Something
like “Initial commit - moving project” could work
3.22. Click the checkmark at the top of the Source Control panel
3.23. Open the integrated terminal found under View > Integrated Terminal
3.24. In your command line, type git remote add origin
https://github.com/YOUR-USERNAME/github-move.git
3.25. In the Source Control panel, click the expandable three dots that open a menu
of options
3.26. When asked if you’d like to publish the branch, click Okay

- Using Atom

3.27. In Atom, open the folder for your project


3.28. At the top of your screen, click Packages. Select GitHub, and then toggle the
Git Tab from the drop-down menu
3.29. Select Create Repository within the Git tab on the right-hand side of your
screen
3.30. Select Init to accept the default prompt of the pop-up window
3.31. In the Git tab, you can see that your files are ready for staging. It should be
accounted for, but double check to make sure that none of your binaries or
files that you listed in the .gitignore are listed in this dialog menu.
3.32. Select Stage All
3.33. In the box at the bottom of the Git panel, type a commit message. Something
like “initial commit - moving project” could work
3.34. Select Commit
3.35. Close Atom
3.36. In your command line, navigate to your project directory
3.37. Type git remote add origin
https://github.com/YOUR-USERNAME/github-move.git
3.38. Return to Atom and select the Up/Down arrow icon at the bottom of your Git
Tab
3.39. Click Push, above the noted dialog
3.40. Return to your repository and note a successful push by finding your files on
Github’s code tab

- Using Eclipse

3.41. In Eclipse, from the Eclipse Marketplace, install the eGit GitHub plugin
3.42. Open you existing project
3.43. Display the Git Repositories window by selecting Window > Show View >
Other > Git > Git Repositories
3.44. Click the Create a Git Repository button on the Git Repositories pane
3.45. Make changes to your project and create a commit
3.46. Push the master branch
3.47. When asked for a remote, paste the URL you copied earlier
3.48. Click next, and enter the branch name

4. Prepare to collaborate

Navigate to the below issues created in your project and tracked with a milestone

4.1. Milestone - https://github.com/YOUR-USERNAME/github-move/milestone/1

5. Project settings

Inviting Collaborators

5.1. Ask for the username of the person you’re inviting as a collaborator. If they
don’t have a username yet, they can sign up for GitHub
5.2. Click on the Settings tab for this repository
5.3. In the left sidebar, click Collaborators & Teams
5.4. Under “Collaborators”, start typing the collaborator’s username
5.5. Select the collaborator’s username from the drop-down menu
5.6. Click Add collaborator
5.7. The user will receive an email inviting them to the repository. Once they accept
your invitation, they will have collaborator access to your repository
Enabling GitHub Pages for Documentation

5.8. Create a /docs/index.html file in this repository


5.9. In the Settings tab of this repository, scroll to “GitHub Pages”. Enable GitHub
Pages with a source as /docs
5.10. Using static web technologies, you can create documentation in this file that
will be automatically served as a free web page

Creating a release

5.11. On GitHub, navigate to the main page of the repository


5.12. Under your repository name, click Releases
5.13. Click Draft a new release
5.14. Type a version number for your release. Versions are based on Git tags. We
recommend naming tags that fit within semantic versioning
5.15. Select a branch that contains the project you want to release. Usually, you’ll
want to release against your master branch, unless you’re releasing beta
software
5.16. Type a title and description that describes your release
5.17. If you’re ready to publicize your release, click Publish release. Otherwise, click
Save draft to work on it later

You might also like