- Create project directory on local machine
- In terminal, navigate to newly created directory
- Create a new git repo:
git init - Add a readme.md file that states what the project is all about:
touch readme.md - Add a .gitignore file:
touch .gitignore - Add files to staging:
git add -A(taking a snapshot) - Add files (snapshot) to local repo:
git commit -am "commit message" - Go to Github and add a new repository
- After you create repo, copy the "remote add" line, then paste back within your project directory in your terminal
- Now push your local repo to Github:
git push origin master
- After you make your updates, add files to staging
git add -A(taking a snapshot) - Add files (snapshot) to local repo:
git commit -am "commit message" - Now push your local repo to Github:
git push origin master