Want to quickly share some source codes or a project with the developer community? Free cloud repositories (e.g., GitHub, BitBucket etc.) are the possible alternatives. Obviously, you can use one of these repositories from the very beginning of your project; however, until you are ready to share, you may keep the repository private or don’t commit to the cloud. For instance, GitHub uses Git as the underlying version control system and supports unlimited public repositories for free.  A comprehensive tutorial on that can be found here.

Following simple steps just show how to quickly share an existing project codes on GitHub:

  1. Create a free account on GitHub.
  2. Create a repository for the project you want to share.
  3. It’s a good practice to include a readme file and a license file.
  4. Note down the https clone URL of the repository.
  5. On your local system, make sure that Git for windows or equivalent software for your platform is installed.
  6. Designate a local directory where you want to keep all your local repositories (e.g., C:\GitRepos).
  7. Launch Git Bash from this directory. On window Git Bash appears in the context menu.
  8. From Git Bash type the following command which will create a new directory for the repository with a local copy of the repository: git clone [clone URL obtained earlier].
  9. From Git Bash navigate inside the repository directory: cd [repository directory]
  10. From windows explorer copy all your project files inside the repository directory.
  11. From Git Bash type the following command which will add all file to the staging area of the local repository: git add .
  12. From Git Bash type the following command which will commit the changes to the local repository: git commit –m “check-in comment”
  13. From Git Bash type the following command which will publish or push the local changes to the public repository: git push -u origin master
  14. You are done!