You are a developer and creating a sample projects for your learning or for samples that can help you in future. Then why you don’t upload your github/bitbucket. Follow the below steps to upload your project on git/bitbucket.
Upload Project on GitHub – How to add existing project to GitHub or Bit-bucket
- Create account on github or bitbucket.
- Create new respository on github or bitbucket. So you will get a http clone url with .git extension.
- Now come to your local directory/project that you want to upload on git.
- Open directory in terminal.
- Init you project as git repository by following command.
- Connect this repository to remote git repository.
git remote add origin https://github.com/amitbhoraniya/AntExample.git
- Add all your folder and files of project to version control system by following command.
git add .
- commit all your changes that you have added files and folder.
git commit -m 'First Commit'
- Upload/push code to remote git repository.
git push -u origin master
It will ask for password for your git account. Enter it. Done !!