Just the basics.
- Create a projects root folder on your local computer to hold all repositories (repos).
- This 'projects' folder is NOT under source control.
- All of its SUBFOLDERS are individually under source control.
- A: Start on your local machine & push up to cloud
- B: Start in the cloud & clone to local machine
Create a new subfolder under your projects root folder. Use your local IDE to create your app in this subfolder. Use all lower kebob case for the folder name (e.g. my-app).
Include:
- .gitignore
- README.md
- Create a cloud repo with same name as the local repo, e.g. my-app.
- Get the HTTPS URL (see the suggested commands)
When ready to move the project under source control (use the URL from your new cloud repo below):
git init
git remote add origin https://github.com/denisecase/basic-git.git
git add --all
git commit -m "first commit"
git push origin master
- Create a cloud repo - use all lower kebob case for the folder name (e.g. my-app).
Click the 'Clone or download' button to get the HTTPS URL of the project repo.
Open Git Bash in your root projects folder (described above). Use the following to duplicate the repo as a subfolder.
git clone https://github.com/denisecase/basic-git.git
- git init
- git remote add origin
- git add --all
- git commit -m "message"
- git push origin master
- git clone