Action Diary
-
Installed the visual studio code snap package from the App Center
-
Installed Git
How to install Visual Studio Code on Ubuntu
-
-
sudo snap install –classic code
-
--classic : A security switch that grants the application full access to your system resources, effectively disabling the default application sandbox.
-
code : The package name for Visual Studio Code in the Snap Store.
-
GAI: what is the difference between using a snap package and a .deb package to install software on ubuntu
-
The primary difference is that .deb packages share system libraries and are deeply integrated into your Ubuntu operating system, whereas Snap packages are self-contained, isolated containers (sandboxes) that bundle their own libraries and dependencies
How to install Git on local machine
To install Git on Ubuntu, open your terminal and run the command sudo apt update && sudo apt install git -y. This single string refreshes your system's package database and installs the latest stable version of Git available in the default Ubuntu repositories.
Git Installation
-
Update package database
Run sudo apt update to pull the latest metadata about available software.
-
Install the Git package
Run sudo apt install git -y to download and install the software automatically.
-
Verify successful setup
Run git –version to display the active version number and confirm installation.
— how to import github repository to vs code —
To import a GitHub repository into Visual Studio Code, you must clone the repository which downloads a copy of the files onto your computer.
You can complete this process using either the built-in graphical user interface (GUI) or the integrated terminal. Ensure you have downloaded and installed Git on your computer before starting.
Method 1: Using the VS Code User Interface (Recommended)
This approach handles the entire process visually without requiring terminal commands.
-
Copy the Repository URL: Go to your repository on GitHub, click the green Code button, and copy the web address under the HTTPS tab.
-
Open the Command Palette: Launch Visual Studio Code and press Ctrl + Shift + P (Windows/Linux) or Cmd + Shift + P (macOS).
-
Run the Clone Command: Type Git: Clone into the prompt and press Enter.
-
Provide the URL: Select Clone from URL, paste your copied GitHub link, and press Enter.
-
Choose a Save Location: Select the local folder on your computer where you want the project folder to be created, then click Select as Repository Destination.
-
Open the Project: Click the Open notification button that appears in the bottom-right corner once the download finishes.
Method 2: Using the Integrated Terminal
If you prefer managing directories through command lines, you can run a quick command.
-
?Copy the URL: Get the HTTPS repository address from the green Code button on your GitHub page.
-
Open the Terminal: Inside Visual Studio Code, navigate to Terminal > New Terminal from the top menu, or press Ctrl + ` .
-
Execute the Clone: Type git clone , paste your link, and hit Enter. It will look like this:
git clone https://github.com/username/repository-name.git
Open the Folder: Click File > Open Folder (or Open… on macOS) and select the newly created repository folder to start editing
— ubuntu how to save local project to github account from Visual Studio code —
To save a local cloned project to your GitHub account from VS Code on Ubuntu, you just need to stage your changes, commit them locally, and push them back to the remote GitHub repository [1, 2].
Here is the exact step-by-step process using either the built-in VS Code interface or the integrated terminal.
Method 1: Using the VS Code Interface (Easiest)
-
Open the Project: Launch VS Code and open your cloned folder via File > Open Folder….
-
Open Source Control: Click the Source Control icon on the left sidebar (looks like a branching tree) or press Ctrl + Shift + G.
-
Stage Changes: You will see a list of modified files. Hover over the files and click the + (plus) icon next to them to stage your files.
-
Commit Locally: Type a brief descriptive note (e.g., “updated code”) in the Message input box at the top, then click the Commit button.
-
Push to GitHub: Click the blue Sync Changes button that appears. Alternatively, click the … (three dots) at the top right of the Source Control panel and select Push.
-
Authenticate: If prompted by Ubuntu/VS Code, click Allow to sign into your GitHub account via your web browser to authorize the upload.
Method 2: Using the Integrated Terminal (Fastest)
If you prefer using command lines on Ubuntu, you can complete this quickly through the built-in terminal:
Open Terminal: In VS Code, click Terminal > New Terminal from the top menu, or press `Ctrl + “.
?
-
Stage Files: Run the following command to track all your new and changed files: git add
-
Commit Changes: Save the files to your local history with a message: git commit -m "Your custom commit message"
-
Push to GitHub: Send the changes straight to your GitHub account: git push origin main