Code Repos¶
Critical Making Sandbox¶
The cm-sandbox repo is a starting point for web projects using HTML, CSS, and JS running on a localhost server.
To use:
-
Navigate to your project directory:
cd /Users/username/code -
Clone repo:
git clone https://github.com/rjduran/cm-sandbox.git my-project-nameThis will clone the
cm-sandboxrepo into a new project folder namedmy-project-name. Now you have a starting point for a new web project running withlive-server. If you plan to make any commits to a repo on Github with this new project folder you will need to create a repo on Github with the same project name and assign the remote to your repo. -
Assign a new remote to your new project repo.
Assuming I have a new project folder called my-project-name and a new repo on Github with the same name, follow the steps below and replace the remote URL with your new repo URL.
1 2 | cd my-project-name git remote -v |
You will see something like this returned:
1 2 | origin https://github.com/rjduran/cm-sandbox.git (fetch) origin https://github.com/rjduran/cm-sandbox.git (push) |
Copy the url to your new Github repo and use with the git remote command then push the changes to your repo. Check what the remote is set to by using the git remote command as above. It should be updated with your new project URL. Prior to pushing the changes you can make any edits to the files in the repo and add them and commit them.
1 2 3 | git remote set-url origin https://github.com/rjduran/my-project-name.git git remote -v git push -u origin master |
You can read more about changing remotes between HTTPS and SSH and vice versa here.