Github
- How to push an existing git repository to GitHub?
- Assuming your ssh key and user is already setup.
-
- create the GitHub repository
-
- Initialize your git local repository if you have not done so
-
- Add github as a remote repository:
git remote add origin git@github.com:your-username/your-repo-name.git
- Add github as a remote repository:
-
- Push local commits to GitHub main branch:
git push -u origin main
- Push local commits to GitHub main branch:
- How to setup README, .gitignore, and GitHub Actions
- A readme file is just a markdown file in the root of your repository. It contains a description of your project.
- The purpose of the gitignore file is to prevent sensitive information from being commited to your github repository. Examples: logs, local files, compiled binaries etc..)
- Here is some examples of what you can add to your gitignore:
# Compiled source
*.class
*.o
*.so
# Logs
*.log
# OS junk
.DS_Store
Thumbs.db
# Node/Ruby/Python package stuff
node_modules/
vendor/
.env
__pycache__/
*.pyc
- GitHub Actions are part of your CD/CI pipeline. This automates testing and deployment when push and pull requests are made. These are project specific.