Search This Blog

Sunday 21 February 2021

Create new project and push to Github

work on a project locally inside a folder. Before you execute any git commands make sure you exclude any sensitive files where you may have credentials. For example you may have a creds.py file to avoid saving usernames, passwords or API keys directly into your development code. 

$ echo creds.py >> .gitignore 

## Initialize a new repository from command line

echo "# Flask-Portal" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M master
git remote add origin https://github.com/aresik/Flask-Portal.git
git push -u origin master


No comments:

Post a Comment

Nornir Compliance Check