When building up your project directory, you want to be sure that you have access to all your files. This is especially important when working in a remote server environment. This tutorial will cover how to use VS Code to manage your files with ease!
Local file management both inside and outside dev containers can be done through:
To move files from local to remote, we can simply drag and drop files into VS Code's explorer to transfer them to the remote server we're working on:
In order to get files from your remote server onto your local machine, first select the files you wish to move and then right-click to "Download..." them into your desired location:
It is recommended to manage your work through a version control tool like
git. You can use
git to upload your work to a remote repository hosted on GitHub. GitHub is also an excellent way to provide reproducible code and manage code bases of teams with multiple researchers.
This portion of the tutorial will go through setting up a simple git repository that is linked to one hosted on your GitHub.
In our initial setup, we need to configure your git username and email address:
git config --global user.name "YOUR_NAME" git config --global user.email "YOUR_GITHUB_EMAIL"
YOUR_GITHUB_EMAIL should be set appropriately. To verify that they've been set, simply use the following commands:
git config --global user.name git config --global user.email
In order to manage your changes, you must first "Stage" them for commit from your "Changes" drop down. Once you do that, write a commit message, press commit, and lastly press "Sync Changes" to push your changes to the remote repository. The version control workflow can be summarized as follows:
In addition to this, we can also pull changes that were committed from another computer or another person through a "pull" action of syncing.