The easiest way to share a single file or small number of files is to send them over Slack. We recommend you do so using Slacks snippets
. You can create a new snippet by typing /snippet
in the chat text box. This will open a new window where you can paste the contents of your file to share.
Copy and Pasting text from Slack not in a snippet might behave unexpectedly in VSCode. Copying general text from Slack, particularly quotations, will likely not be interpretted correctly by VSCode. Slack uses "special" quotations that appear italicized, whereas the quotations used by VSCode are vertical. See the block below for an example:
“banana” // from Slack
"banana" // from VSCode
- Both partners download VSCode extension: LiveShare
- From the VSCode text editor with the project open, you should see a tab
Visual Studio Live Share (Workspace)
- Inside this tab, you should see the folder for the project you are collaborating on. From the example image below the project is
person-constructor
- Right click the folder name
- There will be an option to
Download
- Select where you want to save the project on your machine!
Note: After you download the file, any new changes to the original will not be reflected in your downloaded copy
You will need the article Git Basics
As the person with the code to share, follow steps under How to Add Git to Your App/Directory
. Once the repo has been created, share the link to the repo with your partner.
As the person receiving the repo link:
- Navigate in the terminal to the folder where you want this codebase to live (such as
challenges
) - If using
challenges
, make sure you do not already have a directory with the same name as the repo your partner sent you, otherwise it will overwrite your original work! When this is the case, you can rename the folder you already have. - Run the command
git clone <url-to-repo>
to create a new directory for the codebase shared cd <name-of-repo>
to interact with the codebase
If new changes are made to the codebase after you cloned, the person with the changes will need to make a commit
and push
the changes to the repo on GitHub. Once the new changes are pushed to GitHub, the other partner can run git pull origin main
to bring in the new changes to the codebase on their machine.
General Tips on Git:
- You will not need to use Git until Project weeks
- You likely will not need to learn about or use branching until Project weeks
- You can follow these same steps on how to
clone
a repo if you want to use a codebase shared from a facilitation or clinic - Let us know if you have any questions and we're happy to help!